It is tricky to explain, so lets start with an example:
I have a sqlite table containing multiple fields (id, language, title, etc.)
For one single title, they maybe several languages.
id -- language -- title -- publication -- etc.
----------------------------------------------------------------------
1 -- Eng -- Les misérables -- 1968 -- ...
2 -- Fr -- Les misérables -- 1985 -- ...
3 -- Fr -- Les misérables -- 2001 -- ...
4 -- Eng -- Brave new world -- 1975 -- ...
5 -- Eng -- Brave new world -- 1999 -- ...
6 -- Fr -- Brave new world -- 1999 -- ...
My problem:
I would like in only one SELECT request to get the first result in English and in French.
SELECT (id WHERE language='Eng') AS id1, (id WHERE language='Fr') AS id2 FROM myTable GROUP BY title
To continue the example the request would give as a result
// this is javascript but the problem is about the sql part
results.rows.item(1).id1 = 1
results.rows.item(1).id2 = 2
results.rows.item(2).id1 = 4
results.rows.item(2).id2 = 6
etc.
Of course the syntax above is wrong, but is it possible to do in SQL?