I don't think it does - I have the same problem as jcorbett. As soon
as you include the "id" in the query, "distinct=True" will return all
rows, because they are distinct by id.
Some SQL dialects (eg in Postgres) however let you specify "select
distinct on(columns), other columns ..." or similar which seems quite
convenient
However, after reading
http://www.databasejournal.com/features/postgresql/article.php/3437821/SELECT-DISTINCT-A-SQL-Case-Study.htm
I started thinking about alternatives
Horst
practical example from my own web app:
A doctor prescribes medication. He can select it from a pharmaceutical database.
He can select the drug by generic or brand name.
Each drug comes in a variety of forms, strengths, packet sizes etc.
plus some incur health system subsidies, some barnd price premiums
etc.
In most instances, I am not interested whatsoever in 20 manufacturers
producing the same product and it coming in a variety of packet sizes
- all I want is Amoxycilin trihydrate tablets 500mg (and not a hundred
variations thereof cluttering my selection widget). There are some
60,000 drug product entries in the larger drug database - and less
than 2000 unique drugs
But, in order to call up product information and to check allergies
and interactions - I need the id of the drug.
Just one of a great many practical examples.
Horst