SQL – Select

Basics

I learned SQL close to 25 years ago. The basic skill I learned, along with some rough methodology of applying them has got me through since then.

First basic SQL works in all RDBMS platforms. I have worked on Oracle, SQLServer, Teradata,Postgres and so on.

“Select” will get you through most of the data exploration and analysis you would need to.

Basic “Select” is selecting some/ all columns from a table with an optional filter for rows.

Once you have understood important columns from a table, you are close to understanding the table.

I have some exposure to business processes and functions so maybe now things come easier but checking the data against wha the client specifies as issue/use case is a good start. Then try asking good informed questions instead of asking for an explanation of all the columns in all the tables one by one.

The next steps for a Select are

– grouping

– join

– subquery

– analytic functions

Only thing you need after these is practice and enjoy.

Two things to be careful about

  • make sure you include all the required conditions
  • Try to put filters which reduce the rows most first. People say it doesn’t matter in modern versions but I developed it as a habit and it may be worthwhile to confirm before discarding.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.