That being said a 146MB CSV with 5 million rows is not a challenge for vanilla PostgreSQL either. If you're willing to add an index and use window functions (which MapD doesn't seem to support), you can run this query in ~34ms: https://gist.github.com/felixge/fffef4bc41a5e87e26f62c2a5c8e...
I have no experience with MapD, but people often significantly underestimate the performance of relational databases and reach for the big/expensive toys too soon.