Which two statements return two rows each?

The people table contains the data as shown:

Which two statements return two rows each?

The people table contains the data as shown:

Which two statements return two rows each?

A.
SELECT DISTINCT last_name, first_name FROM people

B.
SELECT 1,2 FROM people GROUP BY last_name

C.
SELECT first_name, last _name FROM people WHERE age LIKE ‘2’

D.
SELECT 1, 2 FROM people WHERE last _name =’smith’

E.
SELECT first _name, last_name FROM people LIMIT 1, 2



Leave a Reply 5

Your email address will not be published. Required fields are marked *


swdx

swdx

B and E. Just try in the console.

Jay

Jay

B,E.

Asked only for 2 rows which B provided, may have not been the names in the table but it produced the 2 rows.

create table q75
(
first_name char(10),
Last_name char(10),
age int);

insert into q75 values (‘John’,’Smith’,42),(‘Andrew’,’Smith’,23),(‘Alice’,’Smith’,18),(‘Wendy’,’Jones’,31),(‘Thomas’,’Jones’,45);

select * from q75;

SELECT 1,2 FROM q75 GROUP BY last_name;

SELECT first_name, last_name FROM q75 LIMIT 1, 2;

SELECT first_name, last_name FROM q75 WHERE age LIKE 2;

Alexis

Alexis

B,E tested.