Final answer:
The correct answer is option b). SELECT lastname, firstname, order# FROM customers LEFT OUTER JOIN orders o ON c.customer# = o.customer#.
Step-by-step explanation:
A SQL statement is a set of instruction that consists of identifiers, parameters, variables, names, data types, and SQL reserved words that compiles successfully.
The SQL commands are mainly categorized into five categories:
- DDL – Data Definition Language.
- DQL – Data Query Language.
- DML – Data Manipulation Language.
- DCL – Data Control Language.
- TCL – Transaction Control Language.
In this question, the correct answer is b). SELECT lastname, firstname, order# FROM customers LEFT OUTER JOIN orders o ON c.customer# = o.customer#.
This SQL statement uses a LEFT OUTER JOIN to combine the CUSTOMERS and ORDERS tables based on the customer# column.
It selects the lastname and firstname columns from the CUSTOMERS table and the order# column from the ORDERS table.