Subquery does not work in Databricks Community version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2022 04:59 AM
I am testing some SQL code based on the book SQL Cookbook Second Edition, available from https://downloads.yugabyte.com/marketing-assets/O-Reilly-SQL-Cookbook-2nd-Edition-Final.pdf
Based on Page 43, I am OK with the left join, as shown here:
However, when I try with subquery below, it fails, why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2022 05:07 AM
it must have some github link check there or you cans hare your code and data we can help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2022 06:28 AM
those 3 CSV files are uploaded here:
https://github.com/tanthiamhuat/SQLCookbook
below SQL code works when I work with SQL Server, but does not work in Databricks SQL.
select e.ename, d.loc,
(select eb.received from emp_bonus eb
where eb.empno=e.empno) as received
from emp e, dept d
where e.deptno=d.deptno
order by 2