# data[].attributes.body
LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.

# data[].attributes.body
https://www.codecademy.com/catalog/language/python

# data[].attributes.attachment_link.description
Start your coding journey with Python courses and tutorials. From basic to advanced projects, grow your Python skills at Codecademy.

# data[].attributes.body
There are 10 kinds of people in this world. Those who understand binary and those who don’t.

# data[].attributes.body
https://geekflare.com/sql-cheat-sheet/
It is an ultimate SQL cheat sheet.

# data[].attributes.attachment_link.readable_text
SQL, or Structured Query L anguage is a set of commands for managing relational database operations like delete, create, update, read, and so on.

SQL has been the international standard used by relational databases since 1987. There are four types of SQL commands:

Data Definition Language (DDL) - These commands define the structure of the database. For example, drop, rename, alter, and create. They affect the database structure. For example, creating a database or renaming a table.

Data Manipulation Language (DML) - These commands are used to work with the data. For example, insert, select, update, delete. These don't affect the tables or database structure, but the data present in the tables. For example, inserting a new row, or updating a value in the row.

Transaction Control Language (TCL) - These commands control the transaction processing in the database. For example, rollback, save, commit. These commands have a permanent impact on the database. For example, rolling back the entire transaction to the previous state even if one process fails.

Data Control Language (DCL) - Data Control commands are used to authorize users and grant only the necessary permissions to a user or group. For example, one user can have read-only permission, whereas another can have read and write. The access control is done using the grant, deny and revoke commands.

Below is the SQL Cheat sheet containing the most useful commands. The cheat sheet will help you quickly reference the required commands with the correct syntax and expected result of a query. In this cheat sheet, we focus on DDL and DML commands as the other two types are quite straightforward to use.

Data Definition and Manipulation Queries

ASC

Returns the data in asc ending order, used with the ORDER BY clause. ORDER BY itself sorts the results in ascending by default.
SELECT employee_name, joining_date, salary from employee ORDER BY employee_name ASC;

DESC

Returns the data in de sc ending order, used with the ORDER BY clause.
SELECT employee_name, joining_date, salary from employee ORDER BY employee_name DESC;

GROUP BY

Groups data as per the specified column, used for aggregate functions

Display the number of employees in each country

SELECT COUNT(employee_id), country from employee GROUP BY country;

Shows the average ratings of employees of each department

SELECT AVG(rating), department from employee GROUP BY department;

INDEX

Index makes querying data more efficient and faster. Indexes are usually created on columns that are searched most.

Create index:
CREATE INDEX idx_employee ON employee (first_name, last_name);

Create a unique index where values cannot be duplicated:
CREATE UNIQUE INDEX idx_employee ON employee (first_name, last_name);

Delete the index:
ALTER TABLE employee DROP INDEX idx_employee;

ORDER BY

Orders the results in ascending order (by default) or the order specified in the query ( ascending or desc ending)
SELECT employee_name, salary from employee ORDER BY salary DESC;

SQL Commands Cheat sheet for quick reference

Aggregate functions

Aggregate functions are data manipulation commands that work on numeric columns like int, and float. These are helpful in filtering and sorting data at the database level itself. Some commonly used aggregate functions are:

SQL joins are very important because they connect and filter data from multiple tables. Joins are a bit tricky and can give unexpected results, if not executed properly. The below table will help you quickly refer to the 4 types of SQL joins:

Inner join

Returns records that are matching in the tables joined; it is similar to an intersection.

SELECT column1, column2... from table1 INNER JOIN table2 on table1.columnN = table2.columnN;
select c.customer_id, o.order_id, c.customer_phone from customer c INNER JOIN order o on c.customer_id = o.customer_id;

Full (outer) join

Returns all the records that have a match on either side - left or right. It is similar to a union.

SELECT column1, column2... from table1 FULL OUTER JOIN table2 on table1.columnN = table2.columnN;
select c.customer_id, o.order_id, c.customer_phone from customer c FULL OUTER JOIN order o on c.customer_id = o.customer_id;

Left join

Returns all the records from the left table and records that match the criteria on the right table

SELECT column1, column2... from table1 LEFT JOIN table2 on table1.columnN = table2.columnN;
select c.country_id, c.country_name, l.location_name from country c LEFT JOIN locations l on c.country_id = l.country_id;

Right join

Returns all the records from the right table and records that match the criteria on the left table

SELECT column1, column2... from table1 RIGHT JOIN table2 on table1.columnN = table2.columnN;
select c.country_id, c.country_name, l.location_name from country c RIGHT JOIN locations l on c.country_id = l.country_id;

Types of joins with syntax and example

Additional resources

SQL is an important tool for software developers, data scientists, and analysts alike. A handy reference of SQL commands in the form of a cheat sheet can save you a lot of time, and help you understand the expected output of each keyword.

For additional information, please refer to the following resources:
SQL Tutorial: SQL Cheat Sheet Intellipaat: SQL Commands Cheat Sheet WebsiteSetup: SQL Cheat Sheet ProgrammingWithMosh: SQL Cheat Sheet PostgreSQL Cheat Sheet

# data[].attributes.attachment_link.title
Ultimate SQL Cheat Sheet to Bookmark for Later [2022]

# data[].attributes.attachment_link.description
SQL, or Structured Query L anguage is a set of commands for managing relational database operations like delete, create, update, read, and so on. SQL has been the international standard used by relational databases since 1987. There are four types of SQL commands: Data Definition Language (DDL) - These commands define the structure of the database.

# data[].attributes.body
Three relational databases walk into a NoSql bar. They left after 5 mins...They couldn't find a table!

# data[].attributes.body
Alaska

# data[].attributes.body
A SQL query walks into a bar, walks up to two tables and asks “Can I join you?”

# data[].attributes.body
It helps to visualize the code you're writing and helps you understand it

# data[].attributes.attachment_link.title
Python Tutor code visualizer: Visualize code in Python, JavaScript, C, C++, and Java

# data[].attributes.attachment_link.description
bugs & unsupported features | why are there ads?

# data[].attributes.body
Rohit: September 2nd

# data[].attributes.body
Shruthi: September 2nd

# data[].attributes.body
Italy

# data[].attributes.body
London!!

# data[].attributes.body
Cricket

# data[].attributes.attachment_link.readable_text
Image Source : GETTY IMAGES
Michael Vaughan has predicted big things for the Indian cricketer, saying that he could be the next "global superstar" from India after MS Dhoni and Virat Kohli.

Team India registered a comprehensive win in the three-match T20I series against Australia, beating the home side in the first two games. The side made a remarkable comeback from the loss in the ODI series, and will aim to secure a clean sweep in the final T20I which takes place later today.

Many players stepped up through the course of the limited-overs series for India, but one name which stood apart with his consistent performances was Hardik Pandya.

Pandya, who had been included in the squad purely as a batsman, justified his inclusion with a number of match-winning innings. In the final ODI, Pandya remained unbeaten on 92 as he aided India to a 13-run win.

In the second T20I, the swashbuckling batsman scored 42 off just 22 deliveries, finishing the match with a six. Pandya has since been receiving praise from fans and experts alike, and the latest to join the list of his admirers is former England captain Michael Vaughan.

He believes that Pandya could be the "next superstar" for Team India after Mahendra Singh Dhoni and Virat Kohli.

" MS Dhoni, he had that mantle for many years. Virat Kohli has it now. It's generally the Indian players that get put onto that pedestal and I think Hardik's got a chance to be the next superstar," said Vaughan in a conversation on Cricbuzz.

While Dhoni led India to twin World Cup triumphs and ended his career as one of the most successful captains for the country, Kohli, who is currently the skipper in all formats, is widely regarded as the best batsman in the world.

"He has to look at the next three years. With the next T20 world cup being in India, obviously, the IPL being in India, the next 50-over World Cup is in India in 2023, Hardik Pandya has got a great opportunity to become the next global superstar," Vaughan further said.

# data[].attributes.attachment_link.title
After Dhoni and Kohli, he could be next 'global superstar': Michael Vaughan on Team India player

# data[].attributes.attachment_link.description
Team India registered a comprehensive win in the three-match T20I series against Australia, beating the home side in the first two games. The side made a remarkable comeback from the loss in the ODI series, and will aim to secure a clean sweep in the final T20I which takes place later today.

# data[].attributes.body
Everyone has only one sibling

# data[].attributes.body
Travelling!!

# data[].attributes.body
Mayuri: 5th Dec

# data[].attributes.body
The Three Musketeers

# data[].attributes.body
Maverick

# data[].attributes.body
Team 3