Question: USING SQL Create a view that list all vendors names and the average_months_between the invoice_due_date and the invoice_date. Round the average_months_between to one decimal point
USING SQL
Create a view that list all vendors names and the average_months_between the invoice_due_date and the invoice_date. Round the average_months_between to one decimal point e.g. (99.9). Filter your results to only show those vendors that the average_months_between is greater than or equal 1.5 months. Then, sort the result set in descending order by the average_months_between. Hint: the round of 12.567 to one decimal point can be obtained using ROUND(12.567,1) = 12.6
The tables are VENDORS and INVOICES
with VENDORS.vendor_name, INVOICES.invoice_due_date, INVOICES.invoice_date as the fields
How would you subtract the two dates and round the difference in the select statement of a view?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
