Hello !<p>I've been looking ath the HASHCODE 2018 competition and got interested on the problem proposition:<p>Task
Given a list of pre-booked rides in a city and a fleet of self-driving vehicles, assign the rides to vehicles, so
that riders get to their destinations on time.<p>For every ride that finishes on time (or early), you will earn points proportional to the distance of that ride;
plus an additional bonus if the ride also started precisely on time.<p>It took me a while to get something working and at end I saw that I was basically using sqlite3 capabilities to do the data manipulation tasks and only needed a few calculations for the rest.<p>So I tried to see if I also could make those calculations inside sqlite3 and after a while I could get it to work:<p><a href="https://github.com/mingodad/sqlite3-hashcode-2018/blob/master/hashcode2018.sql" rel="nofollow">https://github.com/mingodad/sqlite3-hashcode-2018/blob/maste...</a><p>As I stated there:<p>By no means I claim that solutions like this (stretching sqlite3) are good practice. Take it as an example that demonstrates several capabilities of sqlite3 in a hack/compact way.<p>So I'm showing it here just in case it can help/invite other people to find imaginative ways where sqlite3 can be used to solve problems.<p>Cheers !