A very common type of SQL query is the TOP-N query, where we need the "TOP N" records ordered by some value, possibly per category. In this blog post, we're going to look into a variety of different aspects to this problem, as well as how to solve them with standard and non-standard SQL. These … Continue reading How to Write Efficient TOP N Queries in SQL
Tag: Lateral Join
How to Find the Closest Subset Sum with SQL
I've stumbled upon this very interesting question on Stack Overflow, recently. Its title is: [How to] compare a number with sum of subset of numbers In this article, we'll compare the user's imperative approach to the extremely elegant (Oracle) SQL approach. We'll be making use of any combination of these awesome SQL features: Window functions … Continue reading How to Find the Closest Subset Sum with SQL
jOOQ Newsletter: December 30, 2013. Happy New Year!
subscribe to the newsletter here Tweet of the Day We would like to contribute this new section of the newsletter to our followers, users, and customers. Here's Andy Van Den Heuvel, who appreciates jOOQ's and MyBatis' (both being "post-JPA" frameworks) return to SQL. https://twitter.com/andyvdh7/status/416685921288093696 2013 from jOOQ's perspective 2013 was a very exciting year for jOOQ and jOOQ customers. … Continue reading jOOQ Newsletter: December 30, 2013. Happy New Year!