BCS 360 quiz: Lab2 - Programming in SQL
Document Summary
Lab 2: write a select statement that returns three columns from vendors table. The columns which will return are vendorname, vendorcity, vendorstate. Your results must be ordered by the state. select vendorname, vendorcity, vendorstate from vendors order by vendorstate: write a select statement that returns 2 columns named id, date and difference. Id is a column alias for the vendorid. Date is a column alias for the invoicedate. Difference is a column alias for the difference between invoicetotal and. Vendors. vendorid as id, invoices. invoicedate as date, (invoices. invoicetotal-invoices. paymenttotal) as difference from invoices join vendors on invoices. vendorid = vendors. vendorid: write a select statement that returns one column from vendors table names city and state. Create this column from the vendorstate and vendorcity columns.