datacamp/antlr-plsql

support for case when and subqueries

colinricardo opened this issue · 1 comments

Currently code with CASE..WHEN or subqueries in them seem to produce Unshaped nodes.

Case When Example

SELECT name, continent, code, surface_area,
    CASE WHEN surface_area > 2000000 THEN 'large'
       WHEN surface_area > 350000 THEN 'medium'
       ELSE 'small' END AS geosize_group
FROM countries;

Subquery Example

SELECT local_name, subquery.lang_num
FROM countries,
  (SELECT code, COUNT(*) AS lang_num
   FROM languages
   GROUP BY code) subquery
WHERE countries.code = subquery.code;

cc @ismayc

I'll be gone Thurs and Friday, but will add it to the queue of things!