SQL Guide: Getting Started

 

SQL : Structured Query Language 

  • Enables data analysts to talk to their databases.
  • Extremely helpful when working with large datasets in tables.
  • helps to investigate huge databases, track down text (referred to as strings) and numbers, and filter for the exact kind of data you need (faster than a spreadsheet).

What is a Query ?

  • A query is a request for data or information from a database.
  • When you query databases, you use SQL to communicate your question or request.

What is a Syntax ?

  • Syntax is the predetermined structure of a language that includes all required words, symbols, and punctuation, as well as their proper placement.
  • They are basically a unique set of guidelines.
  • As soon as you enter your search criteria using the correct syntax, the query starts working to pull the data you've requested from the target database.

The syntax of every SQL query is the same:

  • SELECT : to choose the columns you want to return.
  • FROM: to choose the tables where the columns you want are located.
  • WHERE: to filter for certain information.

A more practical way of looking at this template is:

SELECT

Columns you want to look at

FROM

Table the data lives in

WHERE

Certain condition is met


Following this method each time makes it easier to write SQL queries. It can also help you make fewer syntax errors.  

 

 

 

 

 

 

 

 



Comments

Most Popular