Added new sql query for retreving