Some of the scripts I have inherited or had to work on have been written by people who separate every logical step into a separate SQL statement and temp table. The longest script I have had to work on was over 20 000 lines which I managed to simplify to couple hundred lines. I frequently…Continue readingSimplifying Lengthy SQL Scripts
Tag: learn sql
Background Whilst I do most of my SQL editing using using an Open Source SQL editing tool, there are some online tools I use for SQL related tasks. I always keep privacy in mind so I never use these tools with sensitive data. Reasons for using these tools include: When I am not working on…Continue readingOnline SQL Tools I Use
SELECT statement I have worked with numerous non IT professionals including medical doctors, accountants, actuaries and accademics who have had to extract the data they need using SQL from relational databases. I firmly believe that if you understand the objective or bigger picture of a language term, you will be a more effective user of…Continue readingSQL: Introduction to SELECT statement, analogy for beginners
Visualising SQL Statements
Usually if I concentrate I am able to understand most SQL statements. There are times though such as: When a set of tables is not familiar When I did not write the SQL statement When the SQL statement is long and involves many tables and joins When I want to discuss a statement with a…Continue readingVisualising SQL Statements
Pivoting data in SQL
Most pivoting of data is done outside of the relational SQL databases. Relational databases are rigid and the variable number of columns in a pivot table is not something that goes hand in hand with the rigid structures defined in relational database. Pivot tables make some data just that much easier to work with. A…Continue readingPivoting data in SQL