Postgres is a relational database, like MySQL and many others. Most relational databases, including Postgres, are queried with SQL. SQL stands for Structured Query Language, and is a standardized language to query relational databases. Even when you use Ecto, the Ecto query is eventually producing some SQL.
SQL is not an Elixir concept: any language that interacts with a relational database does so by sending SQL queries. In fact, if you want to try and learn SQL, the easiest way is to set aside Elixir for a moment, and directly use a database client, like the psql command line client for Postgres.
I suggest you take a step back and learn about relational databases and SQL. A lot of things will be much clearer then. There are many good SQL tutorials and courses online, maybe someone can recommend one.






















