I am getting a syntax error (near as) on line 22 which is
CREATE VIEW myDat
AS
SELECT count(*) AS count
FROM disco l
GROUP BY l.no;
22 SELECT * as no
FROM myDat
WHERE count > (SELECT avg(count) FROM myDat);
I can't seem to figure out what I am doing wrong. I am assuming its the nested SELECT statement in the last line? I looked at the SQLite documentation and it seems be correct. But any other reason for errors?