Home /
Expert Answers /
Computer Science /
data-using-sql-1-create-a-table-called-duplicated-invoices-with-columns-34-invoice-number-34-and-34-pa691
(Solved): data using sql
1. Create a table called DUPLICATED_INVOICES with columns "Invoice_Number" and " ...
data
using sql
1. Create a table called DUPLICATED_INVOICES with columns "Invoice_Number" and "Count_of_Duplicates" that identifies all duplicated invoices. 2. Create a table called BLOCKED_VENDORS with the column "Vendor_Name" that gives a list of all distinct vendor names with invoices in a "Blocked" status 3. Create a table called TOTAL_VENDOR with a column "Total" that gives the total number of Vendors called "Incorporated Path" 4. Create a table called VENDOR_RANK that gives the Vendor names, the total sum of their invoice amounts and their rank per year. Column names should be labelled: "Vendor_Name", "Year", "Invoice Total Amount", "RANK"
\begin{tabular}{|l|l|} \hline Invoice Status & Status Description \\ \hline A & Active \\ \hline B & Blocked \\ \hline C & Closed \\ \hline \end{tabular}
Answer :Answer 1. Create a table called DUPLICATED_INVOICES with columns "Invoice_Number" and "Count_of_Duplicates" that identifies all duplicated invoices. This creates a table called DUPLICATED_INVOICES with two columns: Invoice_Number and Count_of_Duplicates. The Invoice_Number column is the primary key of the table, and the Count_of_Duplicates column counts the number of times each invoice number appears in the table.