todo: rest of tables, all one sql statement