SQL by Examples — #3 (Exponential row generator)
In this series we look at all sorts of SQL features, by doing examples from real world scenarios.
Content:
· Intro
· Source data & DIY setup
· Quiz
· Concepts explained
∘ 1. Exponential Row Generator : Cross Join
∘ 2. Unique data value generation
· Solution
Intro
Sometimes we need to generate big amounts of data with different data types, to help us with the development, to test, debug, tune the performance of our queries, data processes, algorithm.
In this post I want to share a simple way to do it, starting from a simple and little data set.
Source data & DIY setup
If you want to try it yourself, here is the script to build from scratch the table, and load it.
If you don’t have a database installed on your PC, you can use an online live database platform (for free), such as MySQL, PostgreSQL, etc., on sqliteonline.com.