SELECT * FROM raw_meta LIMIT 15; SELECT * FROM poems LIMIT 5; SELECT * FROM poem_theme LIMIT 5; SELECT * FROM locations WHERE loc_id=808 LIMIT 5; SELECT COUNT(*) FROM p_loc WHERE loc_id=808; SELECT * FROM p_loc LIMIT 5; SELECT * FROM poems WHERE NOT ((nro LIKE 'skvr%') OR (nro LIKE 'kalevala%')) LIMIT 10; SELECT COUNT(*) FROM poems WHERE nro LIKE 'h%'; -- Mitu poeemi on ilma skvr-i, kalevala ja Hurda koguta SELECT * FROM verse_poem LIMIT 5; SELECT * FROM verse_poem WHERE p_id=1500; SELECT * FROM verses WHERE v_id=68288; SELECT * FROM verses WHERE v_id=68289; SELECT * FROM verses WHERE v_id=6769; SELECT * FROM verse_poem JOIN verses ON verse_poem.v_id=verses.v_id WHERE p_id=1500 ORDER BY pos; SELECT * FROM p_loc JOIN locations ON p_loc.loc_id=locations.loc_id WHERE p_id=100000; SELECT COUNT(*) FROM p_loc JOIN locations ON p_loc.loc_id=locations.loc_id WHERE NAME='Kuusalu'; SELECT * FROM locations WHERE NAME LIKE 'Tar%'; SELECT NAME, COUNT(*) AS kogus FROM p_loc JOIN locations ON p_loc.loc_id=locations.loc_id GROUP BY name HAVING kogus>100 ORDER BY kogus DESC; SELECT NAME, COUNT(*) AS kogus FROM p_loc NATURAL JOIN locations GROUP BY name HAVING kogus>100 ORDER BY kogus DESC;