Question: (Please hand write this) Problem 1: Elementary SQL : write SQL queries using the tables below. a. Find good episodes: find the episodes that have

(Please hand write this)

Problem 1: Elementary SQL: write SQL queries using the tables below.

(Please hand write this) Problem 1: Elementary SQL: write SQL queries using

a. Find good episodes: find the episodes that have more than 3.0M viewers. Sort by viewers in descending order, then by season in ascending order, and finally by number in ascending order. Format of each output row: (season, number, title, viewers).

b. Find lucky characters: List names (remove duplicate) who appear in some episode with viewers>=3.0M. Format of each output row: (name).

c. Find the number of unique characters for each episode. Format of each output row: (season, num, number_characters).

d. Find the number of unique characters for each episode, such that there are at least two unique characters in that episode. Format of each output row: (season, num, number_characters).

e. For each episode, find the number of unique characters whose type is A. Format of each output row: (season, num, number_characters)

f. Find seasons (remove duplicate) in which Type A characters have NEVER appeared. Format of each output row: (season).

name type Bob A Jon A Emma B Olivia C pearances (name, seas son, num) name season num Bob 1 Bob1 Jon1 Jon 2 Emma1 Emma 1 Emma 2 Bob 2 Olivia 2 Episodes(season, num, title, viewers) seasonnum t title vie wers 1 Winter 2.5 M 2 King 2.5 M Notes 4.0 M Lands 3.2 M 2 2 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!