GROUP BY and HAVING CLAUSE IN SQL: SQL 30 Day Challenge Day 12
Vložit
- čas přidán 25. 06. 2024
- Day 12 is about grouping data and filter data based on these groups in SQL. Learn the GROUP BY and HAVING clauses to get statistical summaries of your data by groups and to filter data based on a grouping variable.
Video Questions:
/* return the total amount each customer
has spent on invoices in total */
/* return the total amount each customer
has spent on invoices only if the customer has spent
more than 40 */
/* return the total amount each customer
has spent on invoices only if the customer has spent
more than 40 -- we only care about CA customers */
-----------------------------------------------------------------
Download SQLite Studio Here: sqlitestudio.pl/
Download the Chinook Database: www.sqlitetutorial.net/sqlite...
Link to Topic List: docs.google.com/document/d/1f...
Link to Facebook Support Group: / 767988395118964
Link to my Data Etsy Shop (support me to keep making content): jellysgeekygoods.etsy.com
Buy me a coffee to show support: buymeacoffee.com/learningwith...
#sql #sqltutorial #sqlforbeginners
I need to practice more on the having clause😄
8:00 my experience with PostGre and SQL Server is that you cannot use the newly created alias in the WHERE or HAVING of the same Select statement. I guess SQL Lite is different in that respect.
Yes could be a difference based on the SQL tool different dialect...thanks for sharing your experience