I have the following query in my own photo database:
select distinct left(Nr, 8) as Date, Ort from Fotos where Typ='D' order by left(Nr, 8) desc, Ort
Where Nr is a unique string with date + a hyphen + a sequential number in the form yyyymmdd-xxx. Ort is a string, the location of the photo. This works fine so far and I get a list like this:
20220717 Lindabrunn, Symposion
20220717 Feistritzsattel
20220717 Pernitz, Schärfthal
20220715 Mannswörth
20220715 Wienerbergteich
20220715 Zentralfriedhof
20220712 V
20220710 Himberg
But what I really want is the first Nr for a date and a location like this:
20220717-001 Lindabrunn, Symposion
20220717-045 Feistritzsattel
20220717-103 Pernitz, Schärfthal
20220715-001 Mannswörth
20220715-009 Wienerbergteich
20220715-033 Zentralfriedhof
20220712-001 V
20220710-001 Himberg
Can someone help? Thanks