News for hackers. Stuff that matters.
Re:Show HN: Natural-SQL-7B, a strong text-to-SQL model by ComputerGuru on Monday February 05, 2024 @02:36PM (#39265926)
For this example, nothing. It would be useful where neither of the two SELECT queries is a subset/superset of the other. (Not saying you didn't know that.)
Re:Show HN: Natural-SQL-7B, a strong text-to-SQL model by 3rd3 on Monday February 05, 2024 @02:42PM (#39266026)
Could you give an example?
Re:Show HN: Natural-SQL-7B, a strong text-to-SQL model by ako on Monday February 05, 2024 @03:13PM (#39266464)
This will be useful if you have a table with some related history records, e.g., products with product price history, and you want to get the latest price. The lateral join would get all prices for the current product, sort them by date and then pick the top row.
Re:Show HN: Natural-SQL-7B, a strong text-to-SQL model by 3rd3 on Monday February 05, 2024 @03:36PM (#39266790)
How does a lateral (cross) join compare to a window function in your example?
Re:Show HN: Natural-SQL-7B, a strong text-to-SQL model by ses1984 on Monday February 05, 2024 @09:40PM (#39270113)
Is a lateral join more efficient than just saying where product = current sort by date desc ?