Zipfs-Law-Language-Detector/data/training/dbtools/deleteGeneration.sql

12 lines
545 B
SQL

CREATE TEMPORARY TABLE TmpTable AS
SELECT RowId
FROM MacroScore
WHERE Generation = ?;
delete FROM Score WHERE MacroScoreId in (select Rowid from TmpTable);
delete FROM RunningStat WHERE MacroScoreId in (select Rowid from TmpTable );
delete FROM CountTable WHERE MacroScoreId in (select Rowid from TmpTable );
delete FROM Accuracy WHERE MacroScoreId in (select Rowid from TmpTable );
delete FROM Words WHERE MacroScoreId in (select Rowid from TmpTable );
delete FROM MacroScore WHERE RowId in (select Rowid from TmpTable );
DROP TABLE TmpTable;