SQL Advanced Functions Explained: Numeric, String, Date, and Conditional Operations
A technical guide published on DEV Community outlines advanced SQL functions that go beyond basic data selection and filtering. The article categorizes these functions into numeric, string, conditional, and date types, covering operations such as FLOOR, CEILING, ROUND, ABS, and MOD. It explains practical use cases, such as using FLOOR to calculate full hours from minutes and MOD to distribute data into groups or identify even-numbered rows. The guide also highlights key differences across database engines, noting that SQL Server uses LEN() instead of LENGTH() and handles ROUND differently from PostgreSQL. Special attention is given to NULL handling in string concatenation, warning that operator-based joins can silently return NULL when any component value is missing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in