logo

Sums of Line Totals for Each Lnvoice

10 Pages450 Words61 Views
   

Added on  2020-03-16

Sums of Line Totals for Each Lnvoice

   Added on 2020-03-16

ShareRelated Documents
SQL Queries1.Show sums of line totals for each invoice.select inv_number, line_number, p_code, line_units, sum(line_price) from line group by inv_number;2.Locate the record in the vendor table that does not have a value for the attribute V_STATE select * from vendor where v_state = ' ';
Sums of Line Totals for Each Lnvoice_1
3.Find the customers whose balance is greater than 200 but less than 300.select * from customer where cus_balance> 200 and cus_balance<300;4.Using natural join and having, list the customers whose invoice total is greater than 200
Sums of Line Totals for Each Lnvoice_2
select invoice.inv_number, invoice.cus_code, customer.cus_fname, invoice.inv_date, sum(line.line_price) as invoice_total from invoice natural join line, customer group by invoice.inv_number having invoice_total>200;5.6.Show the names of the customers for whom we have invoices.
Sums of Line Totals for Each Lnvoice_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Database Module- Assignment
|13
|272
|56

Show sums of line totals for each invoice.. Query:.
|6
|460
|212

Show Sums of Line Totals for Each Invoice
|6
|479
|147

Database Assignment Module
|13
|375
|111

Database Module Assignment
|13
|366
|40

Database Module | Assignment
|13
|332
|92