The sqlite_master table in "temp" is called "sqlite_temp_master" (temp.sqlite_temp_master) even though it responds to the spelling temp.sqlite_master as well. In either case the alias name is "sqlite_temp_master", not "sqlite_master". You can specify your own alias name which will be...
temp.sqlite_master; --- This throws a "column not found" error, SELECT temp.sqlite_master.sql FROM temp.sqlite_master; --- This works fine, SELECT x.sql FROM temp.sqlite_master AS x; --- Referring to temp.sqlite_master columns directly in the WHERE clause also causes the error. I ...