pgAdmin 4 X pgAdmin File Object v Tools v Help Browser Q > Dashboard Properties S SQL Statistics Dependencies Dependents Processes : dvd rental/post... public.payment... = dvd rental/post... public.payment... # public.payment.. public.rental/d.. dvd rent < > x > Constraints dvd rental/postgres@PostgreSQL 15 > Indexes > GRLS Policies Y v No limit I D V E I V 6 6 VO mum Rules Query Query History Scratch Pad X > Triggers 1 SELECT payment. customer_id, 6. Write a query to return the difference of the payment amount > film_actor SELECT MAX (amount) FROM payment WHERE rental_id = 1 ) AS first_rental_amount, between the first movie rental and the second rental for the following > film_category (SELECT MAX (amount) FROM payment WHERE rental_id = 2 ) AS second_rental_amount, customers inventory SELECT MAX (amount) FROM payment WHERE rental_id = 1 ) - - customer_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10). Columns (4) SELECT MAX (amount) FROM payment WHERE rental_id = 2 ) AS payment_difference inventory_id FROM payment film_id JOIN customer ON payment. customer_id = customer . customer_id WHERE payment . customer_id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) store_id ORDER BY payment . customer_id; last_update 10 > Constraints > Indexes > RLS Policies > Rules > Triggers > language v payment > Columns (6) > Constraints Data Output Messages Notifications > a Indexes > RLS Policies customer_id first_rental_amount second_rental_amount payment_difference > qu Rules smallint numeric numeric numeric > + Triggers [null] [null] [null] rental [null] [null] [null] Columns (7) A W N [null] [null] [null] rental_id [null] [null] [null] rental_date [null] [null] [null] inventory_id [null] [null] [null] customer_id [null] [null] [null] return_date [null] [null] [null] staff_id [null] [null] [null] last_update 10 [null] [null] [null] > >Constraints 11 [null] [null] [null] > Indexes 12 [null] [null] [null] > RLS Policies 13 Inull Inull > Gum Rules Total rows: 257 of 257 Query complete 00:00:00.090 Ln 5, Col 56 21 C Q Search ENG 02:18 bunny IN 02-04-2023
Expert's Answer
Chat with our Experts
Want to contact us directly? No Problem. We are always here for you
Your future, our responsibilty submit your task on time.
Order NowGet Online
Assignment Help Services