This article briefly explains how to write a subquery in SQL by providing examples.