Question: SELECT gla.account _ description , COUNT ( * ) , SUM ( ili . line _ item _ amount ) , invoice _ date FROM

SELECT
gla.account_description
, COUNT(*)
, SUM(ili.line_item_amount)
, invoice_date
FROM general_ledger_accounts gla
INNER JOIN invoice_line_items ili
ON ili.account_number = gla.account_number
GROUP BY gla.account_description
HAVING COUNT(*)>1
ORDER BY SUM(ili.line_item_amount) DESC
;
Modify the solution to exercise 4 so it returns only invoices dated in the second quarter of 2018(April 1,2018 to June 30,2018). This should still return 10 rows but with some different line item counts for each vendor. Hint: Join to the Invoices table to code a search condition based on invoice_date.

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!