# SQL
## Definition
### [[Nexus - Google Analytics Certificate Course|Google Analytics Certificate]]
>[! Definition]
>Structured Query Language or SQL is a computer programming language used to communicate with a [[Database]] by constructing a [[SQL statement]]
## Examples
### Basic Syntax and structure of SQL Statement
```sql
SELECT * -- selects all columns in what ever table specified in FROM
FROM db_movies.movies -- this is the table name db_movies
WHERE genre1 = "Action"
```
The above is an example of a [[SQL statement]]. A statement is a complete piece of code that will do what you are instructing it to do in the all the clauses contained in the statement.
In the example, `SELECT *` and `FROM db_movies.movies` and `WHERE genre="action` are each [[SQL clause|clauses]] of the statement.
Further, `SELECT`, `FROM`, `WHERE` are reserved words called [[SQL keywords]]. Keywords are used to perform various operations in the database. Look for the tag `#SQLkwd` to find all notes with that tag.
## Related
[[Query language]]
[[Query]]
[[SQL statement]]
[[SQL clause]]
[[SQL keywords]]
## Resources
[Dataquest: SQL statments, clauses, keywrds](https://community.dataquest.io/t/what-is-the-difference-between-sql-keyword-clause-and-statement/550661)
[SQL Cheatsheet](https://www.sqltutorial.org/sql-cheat-sheet/)
[W3Schools SQL Tutorial](https://www.w3schools.com/sql/default.asp)
### Dialects and resources
- https://learnsql.com/blog/what-sql-dialect-to-learn/
- https://www.softwaretestinghelp.com/sql-vs-mysql-vs-sql-server/
- https://www.datacamp.com/community/blog/sql-differences
- https://sqlite.org/windowfunctions.html
- https://www.sqltutorial.org/what-is-sql/
### DBMS
- https://dev.mysql.com/doc/mysql-getting-started/en/
- https://docs.microsoft.com/en-us/sql/relational-databases/tutorial-getting-started-with-the-database-engine?view=sql-server-ver15
- https://www.postgresql.org/docs/10/tutorial-start.html
- https://www.sqlite.org/quickstart.html