{"action":"closed","issue":{"url":"https://api.github.com/repos/phpmyadmin/sql-parser/issues/62","repository_url":"https://api.github.com/repos/phpmyadmin/sql-parser","labels_url":"https://api.github.com/repos/phpmyadmin/sql-parser/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/phpmyadmin/sql-parser/issues/62/comments","events_url":"https://api.github.com/repos/phpmyadmin/sql-parser/issues/62/events","html_url":"https://github.com/phpmyadmin/sql-parser/issues/62","id":170567929,"number":62,"title":"Good for your job, but, in some condition it may not work well as expected","user":{"login":"qiukeren","id":2325492,"avatar_url":"https://avatars.githubusercontent.com/u/2325492?v=3","gravatar_id":"","url":"https://api.github.com/users/qiukeren","html_url":"https://github.com/qiukeren","followers_url":"https://api.github.com/users/qiukeren/followers","following_url":"https://api.github.com/users/qiukeren/following{/other_user}","gists_url":"https://api.github.com/users/qiukeren/gists{/gist_id}","starred_url":"https://api.github.com/users/qiukeren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiukeren/subscriptions","organizations_url":"https://api.github.com/users/qiukeren/orgs","repos_url":"https://api.github.com/users/qiukeren/repos","events_url":"https://api.github.com/users/qiukeren/events{/privacy}","received_events_url":"https://api.github.com/users/qiukeren/received_events","type":"User","site_admin":false},"labels":[{"id":216074840,"url":"https://api.github.com/repos/phpmyadmin/sql-parser/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-11T04:22:03Z","updated_at":"2016-11-15T17:23:08Z","closed_at":"2016-11-15T17:23:08Z","body":"Good for your job,but , in some condition it may not work well as expected\n\nfor example, it cannot explain such SQL statement:\n\n```\n$query= 'select DISTINCT 1+2   c1, 1+ 2 as\n`c2`, sum(c2),sum(c3) as sum_c3,\"Status\" = CASE\n        WHEN quantity > 0 THEN \\'in stock\\'\n        ELSE \\'out of stock\\'\n        END case_statement\n, t4.c1, (select c1+c2 from t1 inner_t1 limit 1) as subquery into @a1, @a2, @a3 from t1 the_t1 left outer join t2 using(c1,c2) join t3 as tX ON tX.c1 = the_t1.c1 join t4 t4_x using(x) where c1 = 1 and c2 in (1,2,3, \"apple\") and exists ( select 1 from some_other_table another_table where x > 1) and (\"zebra\" = \"orange\" or 1 = 1) group by 1, 2 having sum(c2) > 1 ORDER BY 2, c1 DESC LIMIT 0, 10 into outfile \"/xyz\" FOR UPDATE LOCK IN SHARE MODE';\n```\n"}}
{"actor":{"display_login":"nijel"}}