{"action":"opened","issue":{"url":"https://api.github.com/repos/agershun/alasql/issues/1059","repository_url":"https://api.github.com/repos/agershun/alasql","labels_url":"https://api.github.com/repos/agershun/alasql/issues/1059/labels{/name}","comments_url":"https://api.github.com/repos/agershun/alasql/issues/1059/comments","events_url":"https://api.github.com/repos/agershun/alasql/issues/1059/events","html_url":"https://github.com/agershun/alasql/issues/1059","id":364768009,"node_id":"MDU6SXNzdWUzNjQ3NjgwMDk=","number":1059,"title":"View selection from view(s)","user":{"login":"monfera","id":1548516,"node_id":"MDQ6VXNlcjE1NDg1MTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1548516?v=4","gravatar_id":"","url":"https://api.github.com/users/monfera","html_url":"https://github.com/monfera","followers_url":"https://api.github.com/users/monfera/followers","following_url":"https://api.github.com/users/monfera/following{/other_user}","gists_url":"https://api.github.com/users/monfera/gists{/gist_id}","starred_url":"https://api.github.com/users/monfera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monfera/subscriptions","organizations_url":"https://api.github.com/users/monfera/orgs","repos_url":"https://api.github.com/users/monfera/repos","events_url":"https://api.github.com/users/monfera/events{/privacy}","received_events_url":"https://api.github.com/users/monfera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-28T07:12:22Z","updated_at":"2018-09-28T07:12:22Z","closed_at":null,"author_association":"NONE","body":"Should views defined over other views work, or view selects can only feed from tables? When defining the view `candidates`, I get a \"Error: Table does not exist: perSizeAggregateLong\". `perSizeAggregateLong` exists - as a view, not a table -, and is of the proper structure, running fine with both `WebSQL` and `sql.js`.\r\n\r\n```\r\n create view perSizeAggregateLong (variable, dimension, extremum, multiplier, randomPointSize, location) as\r\n    select f.variable, f.dimension, f.extremum, f.multiplier, l.randomPointSize, l.location from \r\n      (\r\n        select 'xMin' as variable, xMin as location, randomPointSize from perSizeAggregate union all\r\n        select 'xMax' as variable, xMax as location, randomPointSize from perSizeAggregate union all\r\n        select 'yMin' as variable, yMin as location, randomPointSize from perSizeAggregate union all\r\n        select 'yMax' as variable, yMax as location, randomPointSize from perSizeAggregate\r\n      ) l\r\n      join fieldsMapping f on l.variable = f.variable;\r\n\r\n  create view candidates (location, randomPointSize, dimension, extremum) as\r\n    select l.location, l.randomPointSize, l.dimension, l.extremum\r\n      from perSizeAggregateLong l\r\n      where not exists (\r\n        select null from perSizeAggregateLong r\r\n        where r.randomPointSize >= l.randomPointSize and l.multiplier * r.location < l.multiplier * l.location and l.dimension = r.dimension and l.extremum = r.extremum and l.multiplier = r.multiplier and l.variable = r.variable\r\n      );\r\n```"}}
{"actor":{"display_login":"monfera"}}