Auto commit
This commit is contained in:
parent
721a9d8fb7
commit
8b030d5a28
@ -505,6 +505,35 @@ INSERT INTO book (bid, bname, bsortno, pressid) VALUES
|
|||||||
(1, '红与黑', 11, 100),
|
(1, '红与黑', 11, 100),
|
||||||
(2, '幻城', 12, 102),
|
(2, '幻城', 12, 102),
|
||||||
(3, '希腊神话', 13, 102);
|
(3, '希腊神话', 13, 102);
|
||||||
|
|
||||||
|
#5
|
||||||
|
SELECT b.*
|
||||||
|
FROM book b, press p
|
||||||
|
WHERE p.pressid = b.pressid AND p.pressid = 100;
|
||||||
|
|
||||||
|
#6
|
||||||
|
SELECT b.*
|
||||||
|
FROM book b, press p
|
||||||
|
WHERE p.pressid = b.pressid AND p.pressname = '外研社';
|
||||||
|
|
||||||
|
#7
|
||||||
|
SELECT *
|
||||||
|
FROM sort s
|
||||||
|
WHERE s.scount > 100;
|
||||||
|
|
||||||
|
#8
|
||||||
|
SELECT p.*
|
||||||
|
FROM book b, press p
|
||||||
|
WHERE p.pressid = b.pressid
|
||||||
|
GROUP BY b.pressid
|
||||||
|
HAVING COUNT(*) = (
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM book b, press p
|
||||||
|
WHERE p.pressid = b.pressid
|
||||||
|
GROUP BY b.pressid
|
||||||
|
ORDER BY COUNT(*) DESC
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user