[sqlite] Puzzled about table alias and where they are accessible

2015-10-16 Thread Igor Tandetnik
On 10/16/2015 3:15 PM, Don V Nielsen wrote: > Given the following: > > select * from tmp_addresses [x] > where >rowid in ( > select rowid > from tmp_addresses [a] > where a.version_id = '0060' >and [a].zip = [x].zip and [a].crrt = [x].crrt > limit ( >

[sqlite] Puzzled about table alias and where they are accessible

2015-10-16 Thread Don V Nielsen
Given the following: select * from tmp_addresses [x] where rowid in ( select rowid from tmp_addresses [a] where a.version_id = '0060' and [a].zip = [x].zip and [a].crrt = [x].crrt limit ( SELECT net_non_pieces FROM crrt_net_non [b] WHERE [b].zip =