Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

4. Show the trainees how to do it again.

Answered: 1 week ago