đThe Knowledge Series is a series of easy to read guides designed to help you plug the gaps in your tech knowledge so that you feel more confident when chatting to colleagues. Clearly explained in plain English. One topic at a time.
 If youâre a free subscriber and youâd like to upgrade to receive them you can do so below. Or you can find out more about paid access here.
Hi product people đ,
Rich from the Department of Product here! In this Knowledge Series guide weâll delve into a useful skill for anyone to have: writing basic SQL queries.
I remember at the start of a new role a few years ago being sat in a meeting about customer retention and engagement. At the end of the meeting, my boss turned to me and said: âoh and if you donât mind, can you just write a few SQL queries to grab the data weâve just discussed?â.
I mumbled a âyeah, sure thingâ and quickly headed back to my desk to try to figure out what SQL was so that I could attempt to cobble together the required data. In the end, since time was of the essence, an engineer had to do it for me as I didnât know what I was doing. But soon after that, I made it a personal ambition to learn enough SQL so that that never happened again.Â
Coming up in this đ§ Knowledge Series guide:
What is SQL and whatâs the difference between SQL and noSQL?
Examples of simple SQL queries you can write
How to use ChatGPT to write queries for you
Useful tools you can use for SQL
Letâs get to it.
What is SQL?
SQL stands for structured query language .Â
SQL retrieves information from a database. This process is known as âqueryingâ a database.
Whatâs querying?
Querying is like saying to your database: âhey database, show me all the customers on this packageâ and the database returns a result, known as a âresult setâ. The result is the answer to your query.
SQL is a database-specific programming language that is used by engineers, data scientists, product managers and other tech professionals who want to interact with databases in some way.Â
Some practical use cases for SQL
Data retrieval - data in stored in databases and SQL is used to retrieve it
Data management - SQL allows companies to create, modify and maintain database structure and optimise database performance.
Backend development - SQL is commonly used in backend development since it allows developers to integrate SQL queries within an application. It is often used in combination with programming languages to interact with databases.
The difference between SQL and noSQL
You may have also heard of noSQL. SQL and noSQL are the broad distinctions made between 2 types of databases. Weâll cover databases in a separate post but for now these are the most important distinctions to know about.