Going fast! #DataquestChallenge Premium Annual Offer:
500 get 50% & the next 1000 get 40% off.
GET OFFER CODE

Investigate CSVs with SQL

Hello,

While on an interview process with a company for a Data Analyst role I was asked to do an SQL test. The employer provided me with a document with some questions and a few CSV files with tables.

In the past I did very well on HackerRank tests and I have completed the entire SQL track on Codeacademy. After browsing the internet for hours, at the end I turned down the opportunity to participate because although I knew how to perform the analysis, I didn´t know which platform I could use to perform the querying.

What’s a good platform, database to use in this situations? Any tutorial, guides you can recommend?

Thanks a lot in advance

Obvious (?) disclaimer: I didn’t see these files.

Sometimes companies provide small tables to assess applicants’ knowledge. Tables that humans can take in visually. See examples here.

When that’s the case, I don’t know what it is expected, but I find it reasonable to write the solutions without actually running them in a database. It basically becomes pen and paper test.

If the files were large, the strategy above can still work if there’s sufficient regularity in the data. If there isn’t, then I suppose you should be setting up the database yourself.

I’m pretty sure Excel can do this for you. You can set up the data there and then run SQL on those tables.

If it were me, I’d set up the data in a common DBMS like Postgres, MySQL or SQLite (almost surely I’d use SQLite), but that requires some knowledge on how to set up a database. Using DB Browser minimizes the knowledge you need and you set up it very, very quickly if you know what you’re doing.

Try it out if you want and come back with any questions you might have.

To add to @Bruno’s response, Replit’s free version has a 100MB free storage and a SQLite online IDE that you could use as well. The free version, of course, has its limitation (computation and storage), but it could be a very convenient option if you don’t want to set anything up locally.

1 Like