*Copyright @ www.mycsg.in;


What is the word meaning of subset

  1. A part of a larger group of related things.

Where do we need to subset data

Create sample input datasets

Subset records using the WHERE statement

Create a dataset named males by subsetting the male student records from class dataset

Create a dataset named females_preteen by subsetting female student records whose age is less than 13

Create a dataset named cars_mileage by subsetting cars with mpg_city greater than 24 or mpg_highway greater than 30

Subset records using a subsetting IF statement

Create a dataset named females by subsetting female records using a subsetting IF statement

Create a dataset named select_sedans by subsetting Sedan cars with highway mileage greater than 35 using subsetting IF

Create a dataset named cheap_mileage by subsetting cars with msrp less than 15000 or city mileage greater than 40 using subsetting IF

Subset records using IF THEN OUTPUT

Create a dataset named tall by subsetting students with height greater than 60 using IF THEN OUTPUT

Subset records using IF THEN DELETE

Create a dataset named short by subsetting students with height less than 60 using IF THEN DELETE

Key points to remember