SQL.

0 comments

I need the answers to the following questions. I need to provide the proper SQL queries that would be used in order for me to search a certain database that i have been given.

 

example would be…

 

 7.   Select    name,    season    from EPISODES    where    “GUY”   is    contained    in   name    

 

SELECT name, season  FROM episodes

WHERE name LIKE “%guy%”;

 

 

 

8.   Count    the    instances    where “The”   appears    in    a   name    

 

9.   Select    name,    season    from EPISODES    where    “the”   does   not   appear    

 

10.Select    name,    season    from EPISODES    where    episode    was    in   the   second season 

 

11.Select    name,    season    from EPISODES    where    episode    was    in   the second or fifth season 

 

12.Count    EPISODES    where    episode    was    in   the second or   fifth    season 

 

13.Count    seasons,    aliasing    count    as    “Number    of   Season”   

 

14.Count    number    of episodes   per   season   

 

15.Show episodes   with    no   season 

 

16.Join FOODS    with    FOOD_TYPES,    displaying the   name    column   of   each    

 

17.Display   the   frequency     of food_types    in   FOODS    

 

18.Display   foods and    their   prices    (join    FOOD    and    FOOD_PRICES)    

 

19.Display    each    food   and   its   price 

 

20.Display    each    food,   its   price,   and   its   food    type,    showing    the   most   expensive first 

 

21.List total    amount    for    each    food    type    

 

22.List foods referenced    in   each    episode 

 

 

 

 

 

 

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}