Select table and column and output in CSV