3 ms·
This is very impressive, and kind of mind-blowing that it works. The sample questions are awesome, but I wonder how much veracity it has I asked it "On average
by stnmtn 3y ago
This is very impressive, and kind of mind-blowing that it works. The sample questions are awesome, but I wonder how much veracity it has
I asked it "On average for the past 2 months, how many posts are made to hacker news per day?" It went through about 4 iterations, and was able to get to a table of how many posts were made per day for the past 2 months, but was unable to get the average posts given that, and ended up saying that only 1 post was average per day when that is clearly incorrect.
This was the final, incorrect SQL query. Pretty close, and really fun to see it work on figuring this out and getting close to the answer!
SELECT DATE_FORMAT(FROM_UNIXTIME(time), '%Y-%m-%d') AS day, AVG(1) AS avg_posts_per_day FROM items WHERE time >= UNIX_TIMESTAMP(NOW() - INTERVAL 2 MONTH) AND time <= UNIX_TIMESTAMP() GROUP BY day ORDER BY day DESC LIMIT 60;