pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/uchinokot/sql_writing_drill/commit/4857ed3b1e7dd928d63d560abe0704d409aed2cc

Finished Question 5 of 3-6 · uchinokot/sql_writing_drill@4857ed3 · GitHub
Skip to content

Commit 4857ed3

Browse files
author
Kota Uchino
committed
Finished Question 5 of 3-6
1 parent 2a97b5a commit 4857ed3

File tree

1 file changed

+22
-0
lines changed
  • 3/3-6 相関副問い合わせを使う

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SELECT
2+
ProductID
3+
, ProductName
4+
FROM
5+
Products AS p
6+
WHERE
7+
ProductID IN
8+
(
9+
SELECT
10+
ProductID
11+
FROM
12+
Sales AS s
13+
WHERE
14+
p.ProductID = s.ProductID
15+
HAVING
16+
AVG( Quantity ) <= MAX( Quantity ) / 10
17+
)
18+
ORDER BY
19+
ProductID
20+
;
21+
22+
-- 理解できていないのでもう一度復習する

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy