How to do limit resultset correctly - http://blog.jooq.org/2014/06/09/stop-trying-to-emulate-sql-offset-pagination-with-your-in-house-db-framework/ Using function result as table - http://blog.jooq.org/2014/07/07/postgresqls-table-valued-functions/ Sample of using pivot - http://blog.jooq.org/2014/08/05/are-you-using-sql-pivot-yet-you-should/ and unpivot - http://blog.jooq.org/2016/01/18/impress-your-coworkers-by-using-sql-unpivot/ Sample of using intersect - http://blog.jooq.org/2015/08/04/intersect-the-underestimated-two-way-in-predicate/ Using temp table, rownum, and CTE - http://javarevisited.blogspot.hk/2016/07/how-to-remove-duplicate-rows-from-table-SQL-database.html http://www.sohamkamani.com/blog/2016/07/07/a-beginners-guide-to-sql/ 10 Quick SQL Tips After Writing Daily in SQL for 3 Years - https://towardsdatascience.com/10-quick-sql-tips-after-writing-daily-in-sql-for-3-years-37bdba0637d0 Free books - http://www.java67.com/2017/08/5-free-sql-books-for-beginners-and-experienced-pdf-download.html 9 SQL tricks you may not know about - https://meganlieu.substack.com/p/9-sql-tricks-you-may-not-know-about