Intro to SQL - Part 1

Introduction

Select Single Column

Introduction


Instructions


select device from ecom limit 10
10 records
device
laptop
tablet
laptop
tablet
mobile
laptop
mobile
mobile
mobile
mobile

Select Multiple Columns

Introduction


Instructions


dbGetQuery(con, "select referrer, device, purchase  from ecom")
dbGetQuery(con, "select referrer, device, purchase  from ecom")

Select All Columns

Introduction


Instructions


dbGetQuery(con, "select * from ecom")
dbGetQuery(con, "select * from ecom")

Select All Columns (Limit)

Introduction


Instructions


dbGetQuery(con, "select * from ecom limit 10")
dbGetQuery(con, "select * from ecom limit 10")

Select Distinct

Introduction


Instructions


dbGetQuery(con, "select distinct referrer from ecom")
dbGetQuery(con, "select distinct referrer from ecom")

Count

Introduction


Instructions


dbGetQuery(con, "select count(*) from ecom")
dbGetQuery(con, "select count(*) from ecom")