Question: Write SQL query to create a view payed_vendors, containing the vendor name, the count of invoices, the sum of the total invoices, and the sum

Write SQL query to create a view payed_vendors, containing the vendor name, the count of invoices, the sum of the total invoices, and the sum of the total payments. For those that have 2 or more invoices.

Write SQL query to create a view payed_vendors, containing the vendor name,

COLUMN ID COMMENTS COLUMN_NAMIE 1 VENDOR_ID 2 VENDOR NAME 3 VENDOR_ADDRESS1 4 VENDOR_ADDRESS2 5 VENDOR_CITY 6 VENDOR STATE 7 VENDOR_ZIP_CODE 8 VENDOR_PHONE 9 VENDOR CONTACT LAST NAME VARCHAR2 (50 BYTE) Yes DATA TYPE NULLABLE DATA DEFAULT NUMBER VARCHAR2 (50 BYTE) No VARCHAR2 (50 BYTE) Yes VARCHAR2 (50 BYTE) Yes VARCHAR2 (50 BYTE) No CHAR (2 BYTE) VARCHAR2 (20 BYTE) No VARCHAR2 (50 BYTE) Yes (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) 11 (null) 12 (null) 0 No 10 VENDOR_CONTACT_FIRST_NAME VARCHAR2 (50 BYTE) Yes 11 DEFAULTTERMS_ID 12 DEFAULT_ACCOUNT_NUMBER NUMBER NUMBER 0 0 0 COLUMN NAME| DATA TYPE | NU LLABLE DATA_DEFAULTCOLUMN ID COMMENTS (null) (null) (null) (null) (null) 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) 1 INVOICE ID NUMBER No 0 3 INVOICE _NUMBER VARCHAR2 (50 BYTE) No No No VENDOR ID NUMBER DATE 4 INVOICE_DATE 5 INVOICE_TOTAL NUMBER (9,2) 6 PAYMENT TOTALNUMBER (9,2) 7 CREDIT_TOTAL 8 TERMS_ID 9 INVOICE_DUE_DATE DATE Yes NUMBER (9,2) NUMBER Yes (null) (null) (null) No No 10 PAYMENT_DATE DATE Yes

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!