Add a sql query
Minor fix