Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 YesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started