Changes between Version 1 and Version 2 of SQL
- Timestamp:
- 01/21/25 22:41:06 (5 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SQL
v1 v2 1 === Advanced SQL Queries and Reports for Invoices1 === Advanced SQL Queries and Reports for Invoices 2 2 3 **1. Report: Total Revenue Generated by Each Company in the Last Year** 3 == 1. Report: Total Revenue Generated by Each Company in the Last Year 4 4 5 5 {{{ … … 19 19 }}} 20 20 21 **2. Report: Invoices Issued to Each Client and Their Total Amount** 21 == 2. Report: Invoices Issued to Each Client and Their Total Amount 22 22 {{{ 23 23 SELECT … … 35 35 }}} 36 36 37 **3. Report: List of Overdue Invoices** 37 == 3. Report: List of Overdue Invoices 38 38 {{{ 39 39 SELECT … … 54 54 }}} 55 55 56 **4. Report: Clients with the Highest Invoice Payments** 56 == 4. Report: Clients with the Highest Invoice Payments 57 57 {{{ 58 58 SELECT … … 72 72 }}} 73 73 74 **5. Report: Outstanding Invoices by Each Client** 74 == 5. Report: Outstanding Invoices by Each Client 75 75 {{{ 76 76 SELECT … … 90 90 }}} 91 91 92 **6. Report: Monthly Invoice Revenue** 92 == 6. Report: Monthly Invoice Revenue 93 93 {{{ 94 94 SELECT … … 103 103 }}} 104 104 105 **7. Report: Top 5 Products/Services Sold by Revenue** 105 == 7. Report: Top 5 Products/Services Sold by Revenue 106 106 {{{ 107 107 SELECT … … 117 117 }}} 118 118 119 **8. Report: Invoices with the Most Line Items** 119 == 8. Report: Invoices with the Most Line Items 120 120 {{{ 121 121 SELECT … … 134 134 }}} 135 135 136 **9. Report: Average Time to Payment** 136 == 9. Report: Average Time to Payment 137 137 {{{ 138 138 SELECT … … 144 144 }}} 145 145 146 **10. Report: Invoices with Discounts Applied** 146 == 10. Report: Invoices with Discounts Applied 147 147 {{{ 148 148 SELECT