INF 385T - Afternoons
    Queries 3
    Skip To Content
    Dashboard
    • Login
    • Dashboard
    • Calendar
    • Inbox
    • Help
    Close
    • My Dashboard
    • INF 385T - Afternoons
    • Assignments
    • Queries 3
    Spring 2015
    • Home
    • Syllabus
    • Modules
    • Assignments
    • Research Help
    • Zoom
    • Panopto Video
    • My Textbooks

    Queries 3

    • Due Mar 9, 2015 by 11:59pm
    • Points 7
    • Submitting a file upload
    • Available after Mar 6, 2015 at 11:30am

    Using the class_music_festival, answer these 7 questions. For each query, show the intermediate queries, the final query and the result that you get.  If you are having trouble getting the syntax exactly, just write out what you think the recipe for getting to the answer is, that's really at least half the battle.  Remember to do all your joins before ORDER BY and GROUP BY.  If you see a "disconnected from server" in phpmyadmin that means you missed a join condition (e.g. SELECT * FROM tickets, purchases, without the needed WHERE clause).

    **You can find the basic result solutions to questions 1-4 in this document. Please note that you will still need to step through the queries and show all of your work.

    1. What is the name of the person who spent the most (and how much did they spend)?
    2. Which performance had the highest revenue? (ticket prices are incoming income, thus revenue)
    3. Which performance was the most profitable? (profit is revenue - costs.  bands.fee is the cost)
    4. Which band was the least profitable for the festival? (note: bands are paid their fee for each performance, hint: dealing with that requires a COUNT(DISTINCT ...) within a group) (If you have trouble with this one, just do as though they are only paid the fee once).
    5. Which venues were oversold (and what were their capacities)? (hint: this should use a HAVING clause) (oversold requires math around capacity)
    6. What was the total revenue from ticket sales each month? (hint: needs MONTH(date) in the SELECT clause)
    7. What was the average purchase total each month? (note: purchase total is the sum of the price of tickets bought together in the same purchase, Q1 in in-class exercises.) (two ways to get this done, one that uses AVG and that uses /).

     

    1425963540 03/09/2015 11:59pm
    Additional Comments:
    Rating max score to > pts

    Rubric

     
     
     
     
     
     
     
         
    Can't change a rubric once you've started using it.  
    Find a Rubric
    Find Rubric
    Title
    You've already rated students with this rubric. Any major changes could affect their assessment results.
    Title
    Criteria Ratings Pts
    Edit criterion description Delete criterion row
    This criterion is linked to a Learning Outcome Description of criterion
    threshold: 5 pts
    Edit rating Delete rating
    5 to >0 pts
    Full Marks
    blank
    Edit rating Delete rating
    0 to >0 pts
    No Marks
    blank_2
    This area will be used by the assessor to leave comments related to this criterion.
    pts
      / 5 pts
    --
    Additional Comments
    Total Points: 5 out of 5