Skip to content

DONE#2

Open
Devonte202 wants to merge 1 commit intoThe-Marcy-Lab-School:masterfrom
Devonte202:master
Open

DONE#2
Devonte202 wants to merge 1 commit intoThe-Marcy-Lab-School:masterfrom
Devonte202:master

Conversation

@Devonte202
Copy link

Need to learn how to create rules for UPDATE/DELETE

Copy link
Contributor

@ROgbonna1 ROgbonna1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +9 to +11
SELECT DISTINCT category AS "Genre", avg(price) AS "Price", avg(length) AS "Length" FROM film_list GROUP BY category;

SELECT DISTINCT rating AS "Rating", COUNT(rating) AS "Count" FROM film_list GROUP BY rating;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SELECT DISTINCT category AS "Genre", avg(price) AS "Price", avg(length) AS "Length" FROM film_list GROUP BY category;
SELECT DISTINCT rating AS "Rating", COUNT(rating) AS "Count" FROM film_list GROUP BY rating;
SELECT category AS "Genre", avg(price) AS "Price", avg(length) AS "Length" FROM film_list GROUP BY category;
SELECT rating AS "Rating", COUNT(rating) AS "Count" FROM film_list GROUP BY rating;

You can leave out the DISTINCT modifier when you are using GROUP BY. GROUP BY will make groups based on the distinct values in that column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants