In PhpMyAdmin, go into the SQL tab and enter your query in there. Hit go, then click Export
at the bottom of your results. You can select to export as a CSV.
In case you're interested, here's how to do it via SQL without PMA: How to output MySQL query results in CSV format?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…