Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 only How to check work for columns 1 and 3???? thank you SQL queries to check PSQL query Connect to the dvdrental database.
Part 2 only
How to check work for columns 1 and 3???? thank you SQL queries to check
PSQL query
Connect to the dvdrental database. Answer both part 1 and 2 of this question. Write a query that returns 6 columns from the payment table. Column 1: Total payment amount (sum) made during morning hours (hour =12 ) labeled as pm_sum Column 4: Total count of payments made during evening hours (hour >=12 ) labled as pm_count Column 5: total payment amount (sum) made during all hours labeled as total_sum Column 6: Total count of payments made during all hours labled as total_count You MUST use SUM and CASE WHEN. Expected results: Hint: The amount column tells you how much each payment was for. The payment_date column is a timestamp that tells you when the payment was made. Describe what evidence is available to suggest columns 1 through 4 are being calculated correct? In other words, how do you know columns 1, 2, 3, and 4 are correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started