Split up the SQL