Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an application or website that takes CSV files, loads them into a DB, allows SQL queries to be run on them and then creates charts or graphs with the results?

** Update: I installed MAMP, and that was very painless. ** Here's the import statement for anyone who comes across this:

LOAD DATA LOCAL INFILE '~/musicdata.csv' INTO TABLE MusicData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' (DistributionYear, `Distribution Quarter`, `Statement Recipient ID`, `Statement Recipient Name`, `Party ID`, `Party Name`, `Legal Earner`, `Legal Earner Party ID`, Performance, `Music User Genre`, `Music User`, `Network Service`, `Performance Start Date`, `Performance End Date`, `Survey Type`, `Day Part Code`, `Series or Film/Attraction`, `Program Name`, `Work ID`, `Work Title`, `CA%`, `Classification Code`, `Number of Plays`, `Performance Type (Usage)`, Duration, `Performing Artist`, `Composer Name`, `EE Share`, Credits, Dollars, `Premium Credits`, `Premium Dollars`, `Adjustment Indicator`, `Adjustment Reason Code`, `Original Distribution Date`, `Role Type`);
share|improve this question
Why doesn't a spreadsheet program like excel (or access) work? What are you missing? You want to write in SQL or you'll write in anything, like VBA? – Raystafarian Feb 4 '12 at 17:47
@Raystafarian Well I installed LibreOffice on my Mac, import CSV as DB, then tried to run SQL queries on the data, but the "Query is too complex - only select is supported - ODBC driver error. The query was just a SUM(column) with a Where clause. – patrickinmpls Feb 4 '12 at 18:43
Then you seem to have the typical XY Problem – rather than looking for workarounds, why not ask a new question in order to tackle the actual problem you have? – slhck Feb 4 '12 at 19:24
up vote 1 down vote accepted

You can install MySQL, with the phpMyAdmin frontend management tool. It allows you to import CSV files to a table. Of course, you have to define the table and database schema beforehand.

Then, you can run SQL queries with phpMyAdmin, which is pretty straightforward. PMA also supports Charts.

The results can be exported as CSV again. Actually, graphing or producing charts is not as easy as you might think. To make assumptions about the data format, or the kind of graphs you want to produce, a graphing utility has to be very powerful. Various tools exist, some of the more popular ones:

share|improve this answer
So I guess you kinda have to roll your own... I can do it but I was hoping for a lazier solution. – patrickinmpls Feb 4 '12 at 18:43
This is only what I thought of. Maybe there's something, who knows! But the problem obviously is SQL. It works well on databases, not necessarily CSV files. And then there's graphing too. – slhck Feb 4 '12 at 18:58
Only on a Mac? in Windows you could set up an odbc datasource that is txt or csv and query it from lots of things on your system, webpages, excel or what have you. Perhaps Macs allow the same? – datatoo Feb 4 '12 at 19:47
@datatoo Ah, well I'm not too experienced when it comes to that, but yes, of course ODBC is possible on OS X. – slhck Feb 4 '12 at 19:51

Microsoft's Log Parser is ready-made for this. No need to log data into a database.

More here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.