Introduction to SQL
In Today's world , data is everything to handle and manage data one needs to master in data management. With that comes the language i.e, SQL which is the basis to all. SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. This was initially called SEQUEL(Structured English QUEry Language). The main objective of SQL is to update, store, manipulate and retrieve data stored in a relational database.
IMPORTANT SQL QUERIES
SELECT :It is the most basic SQL query one can use for manipulating a database. The select command is used to select the data from the database and display it to the user.
WHERE : If we need only certain records from the table then we use the where clause
AND, OR, NOT : If we need to add two or more conditions in the where clause then we can use the above-mentioned operators.
GROUP BY, HAVING, ORDER BY : it is ADVANCED important queries This functionality is used to arrange a similar type of data into a group. For instance, if the column in a table consists of similar data or value in different rows then we can use GROUP BY function to group the data.
Relational queries
inner join : inner join returns records at the intersection(common column) of the two tables.
Left join : A left join returns all records from table A and any matching records(Or null if value is not present) from table B.
Right join: Right join is a mirror version of the left join
Full join: Finally, for a list of all records from both tables, we can use a full join.
Modifying databases with sql. CREATE and DROP to create and delete tables.INSERT to add data. UPDATE to modify existing data. DELETE to remove data.It is simpler and safer to modify data when every record has a unique primary key.
Further learning You can learn more about indexes and query planning, constraints, triggers, views, and foreign keys. These days, SQL is often used to analyze data that comes from all sorts of places. One way that you can start analyzing data immediately is with Google's BigQuery, which includes a SQL-like language, and lets you upload data or use public data sets.