DDL
CREATE TABLE AS SELECT
qb.create_table_as(
qb.select('*').from_table('users').where(eq('status', 'active')),
'active_users',
)
# CREATE TABLE active_users AS SELECT * FROM users WHERE status = %(p1)s
# {'p1': 'active'}
See test_create_table
DROP TABLE
qb.drop().table('events') # DROP TABLE events
qb.drop().table('events', 'game', if_exists=True) # DROP TABLE IF EXISTS game.events
DROP VIEW
drop().view('events') # DROP VIEW events
qb.drop().view('events', 'game', if_exists=True) # DROP VIEW IF EXISTS game.events
See test_drop_table.py