.

Introduction to SQL

Introduction to SQL in Big Data Analytics

  • SQL(Structured Query Langauge) is a query language to work with a database
  • It is globally employed language works in mining data from various data sources which includes big data technologies and data warehouse
  • SQL is employed with R. Its like SQL in a database
  • The key elements of SQL are select, from and where
  • To work with SQL inside R, install sqldf package like represented below
  • introduction to sql img1 introduction to sql img2
  • The select query is employed to get the values of columns from tables and to perform calculations
  • The underlying code explains select query various forms. In that ej1 highlights simple select query and the ej2 develops new variables
  • introduction to sql img3 introduction to sql img4
  • An another important query statement in SQL is group by
  • It permits to calculate a numerical value for various groups of an another variable

The underlying code highlights the demo on group by query statement

introduction to sql img5 introduction to sql img6
  • Joins are another important query statement in SQL. It performs joining multiple tables
  • There are various categories of joins existing which includes inner join outer join, etc.,
  • Join merges 2 or more table into a single table through 1 common column matching values in 2 or more the tables
  • The underlying code highlights the joining operations namely inner join and left outer join
  • introduction to sql img7 introduction to sql img8 introduction to sql img9
.