workbench

Learning Goal: I’m working on a databases question and need an explanation and answer to help me learn.

Write SQL queries to do the following. You will do this in one SQL file. This query will open several tabs. Before each query, display a comment with the SQL number.

SQL 1

Write a SELECT statement that does a self-join of the Vendors table and returns these columns: vendor id, vendor name, and contact_name. contact_name is a concatenation of vendor contact first name, a space, and vendor contact last name. You will need to give each table an alias. Return one row for each vendor whose contact has the same last name as another vendor’s contact. Hint: the vendor ids should not be equal, but the vendor contact last name are equal.
Sort the result set by the vendor contact last name. (2 rows)

SQL 2

Write a SELECT statement that does a outer join of the General Ledger Accounts and the Invoice Line Items tables and returns these columns: account number, account description, and invoice id. Return one row for each account number number that has never been used.

Hint: You will need to use the WHERE class to return rows where invoice id IS NULL.
Sort the result set by the account number. (54 rows)

You will have to put a semicolon at the end of every Select statement.

Follow syntax instructions: Statement and clauses are in all caps (anything in blue). Files and columns are in lower case. Indent continuing statements.

Ace Your Assignments! 🏆 - Hire a Professional Essay Writer Now!

Why Choose Our Essay Writing Service?

  • ✅ Original writing: Our expert writers will write each paper from scratch, ensuring complete originality, zero plagiarism and AI free content.
  • ✅ Expert Writers: Our seasoned professionals are ready to deliver top-quality papers tailored to your needs.
  • ✅ Guaranteed Good Grades: Impress your professors with outstanding work.
  • ✅ Fast Turnaround: Need it urgently? We've got you covered!
  • ✅ 100% Confidentiality: Customer privacy is our number one priority. Your identity is anonymous to our writers.
🎓 Why wait? Let us help you succeed! Our Writers are waiting..

Get started

Starts at $9 /page

How our paper writing service works

It's very simple!

  • Fill out the order form

    Complete the order form by providing as much information as possible, and then click the submit button.

  • Choose writer

    Select your preferred writer for the project, or let us assign the best writer for you.

  • Add funds

    Allocate funds to your wallet. You can release these funds to the writer incrementally, after each section is completed and meets your expected quality.

  • Ready

    Download the finished work. Review the paper and request free edits if needed. Optionally, rate the writer and leave a review.