SQL First query helpers.