Fighting with SQL.