Skip to content

Commit 38bf4ef

Browse files
new sql training, unit 0x03
1 parent a61e2a8 commit 38bf4ef

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/databases_sql_training.pdf‎

885 KB
Binary file not shown.

‎exercises/db_training_0x03.sql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- (C) 2025 A.Voß, a.voss@fh-aachen.de, info@codebasedlearning.dev
1+
-- (C) A.Voß, a.voss@fh-aachen.de, info@codebasedlearning.dev
22

33
-- SQL-Commands Unit 0x03
44

@@ -59,7 +59,7 @@ SELECT count(*) FROM shop_product WHERE unit='PC' AND VAT=0.07; -- 16
5959
SELECT count(id) FROM shop_product WHERE unit='PC' AND VAT=0.19; -- 6
6060

6161
SELECT count(VAT),VAT,count(unit),unit,min(price),max(price)
62-
FROM shop_product GROUP BY VAT, unit ORDER BY VAT;
62+
FROM shop_product GROUP BY VAT, unit ORDER BY VAT, unit;
6363

6464
-- Use Group Functions with Joins.
6565
-- Note: LIKE is case-sensitive in PostgreSQL ('%drinks' finds nothing, the

‎exercises/proposed_solutions/db_solution_0x03.sql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- (C) 2025 A.Voß, a.voss@fh-aachen.de, info@codebasedlearning.dev
1+
-- (C) A.Voß, a.voss@fh-aachen.de, info@codebasedlearning.dev
22

33
-- SQL-Solutions Unit 0x03
44

0 commit comments

Comments
 (0)