CREATE TABLE results AS SELECT * FROM loganalysis
WHERE bookingnumber
IN (SELECT bookingnumber FROM advisoryitems GROUP BY bookingnumber)
Select Into is Create As Select
Here's some example SQLite code:
create table results as
select computername, count(*), status, notes from eventviewer
group by computername, status, notes
order by computername, status, notes
RowID is Record ID in SQLite
Use the reserved word, rowid in a SQLite query to return the record number such as:
select rowid, field1, field2 from mytable;
Select and Insert into table
create table temp1 as select field1, field2 from table1
