Question: Write a subquery to return one row per vendor, representing the vendors earliest invoice_due_date. Each row should include ( vendor name, vendor_id, count of invoices,

Write a subquery to return one row per vendor, representing the vendors earliest invoice_due_date. Each row should include ( vendor name, vendor_id, count of invoices, the earliest invoice due date. Filter the result set to only show the rows with more than 3 count of invoices.

[hints:

subquery should include a group by to find invoice with the Min(invoice_due_date), and the count( invoice_id).

The major query should join with the subquery (treat the subquery as a table).

The Sub query should have alias.

All columns inside the subquery should have aliases too

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!