I read several articles that one of the mistakes a regular programmer does not use the potential of SQL, and since then I started looking for replacing parts of my code with SQLish solutions, and not with data selection and processing in a programming language, although I am a true rookie with SQL.
Let's say I have a table randomly populated with values from 0 to 10, and I want to know what values are missing in this range.
For example, the table consists of the following: 0, 1, 3, 4, 5, 7, 8, 9.
The query must return: 2, 6, 10.
source
share