Question 53

Movie groups by rental income

Premium Access

Unlock this premium interview question.

Sign in or upgrade to practice this question with full datasets, official solutions, and guided walkthroughs.

  • 230+ interview questions
  • Official solutions
  • SQL, Python, and R tracks

***********

  • ***** * ***** ** ****** *** ****** ** ***** ** 3 ******** ******: ****, ******, ***.
  • *** ***** ** **** ******* *****'* ******.

**********

  • ****: ******* >= $100.
  • ******: ******* >= $20, <$100 .
  • ***: ******* <$20.

****

  • ** * ***** *** ** ****** *******, ** ******* ** *** *** *****

Table 1: film

       ***_****       |  ***_****
----------------------+--------------------------
 ****_**              | *******
 *****                | ****
 ***********          | ****
 *******_****         | *******
 ********_**          | ********
 ********_********_** | ********
 ******_********      | ********
 ******_****          | *******
 ******               | ********
 ***********_****     | *******
 ******               | ****

Table 2: inventory

**** *** ** ******, ********_** ** *** ******* *** ** **** *****.

   ***_****   | ***_****
--------------+--------------------------
 *********_** | *******
 ****_**      | ********
 *****_**     | ********

Table 3: payment

***** ****** ******* ************ *****

   ***_****   | ***_****
--------------+--------------------------
 *******_**   | *******
 ********_**  | ********
 *****_**     | ********
 ******_**    | *******
 ******       | *******
 *******_**   | ********* **** **** ****

Table 4: rental

   ***_****   | ***_****
--------------+--------------------------
 ******_**    | *******
 ******_**    | ********* **** **** ****
 *********_** | *******
 ********_**  | ********
 ******_**    | ********* **** **** ****
 *****_**     | ********

Sample results


        
    

Last Submission

postgres

No submission yet for this engine. Run and submit your query to save it here.

Copied
Expected results

Submit a query to compare against expected output.