1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

[HELP NEEDED] SQL Queries (Sakila Database)

Discussion in 'Other Languages' started by OliRuns, Apr 29, 2018.

  1. OliRuns

    OliRuns Newbie

    Dec 7, 2017
    Likes Received:
    Hello, basically I need help with a few queries for the SAKILA database. There are 2 questions, this first is...

    Create a listing of all cities that Sakila has an interest in (ie all those that are in the database)
    and show the country and city names together with both the number of customers in each city
    and the total number of rentals they have taken between them together with a calculation of the number of months since the last rental in each city.
    Output should be provided for all cities in all countries starting with 'Au'.

    and the second...

    Create a query to calculate the following stats for rentals taken in each city within a specified country (note that city name should be included):
    (a) the most popular film category,
    (b) the total number of rentals
    (c) the average replacement cost for the film rented,
    (d) the standard deviation for the replacement cost of films rented
    Output should be produced for the United Kingdom. Your written report should discuss what the values output tell you about
    the data for the cities listed. For example, is there much variation in the replacemen cost of films rented in different cities and/or where the most popular category is the same.?

    I haven't got long to work on this so need to get it done fast! Thanks :)