jaagup@praktika1 ~ $ cd public_html/2018/kvant/02
jaagup@praktika1 ~/public_html/2018/kvant/02 $ chmod 777 .
jaagup@praktika1 ~/public_html/2018/kvant/02 $
jaagup@praktika1 ~/public_html/2018/kvant/02 $ mysql -umart -pajutine1234 mart
MariaDB [mart]>
SELECT film_id, production_year, COUNT(*)
from efis_film_music
JOIN efis_film ON efis_film_music.film_id = efis_film.id
GROUP BY film_id
INTO OUTFILE '/home/jaagup/public_html/2018/kvant/02/muusika.txt'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n';
jaagup@praktika1 ~/public_html/2018/kvant/02 $ more muusika.txt
1,2001,3
7,2004,1
8,1979,1
9,1980,1
12,1997,1
13,2001,2
14,1976,1