Hi All,
I have a query question. I can list the first and last number in a series using Min and Max, no probs, but my problem is to also list the associated text with the number. My setup is TableID, Series, Details. Running Min or Max with text gives the wrong result.
Thanks
Query Re listing Text column associated with number column
Query Re listing Text column associated with number column
Open Office 4.1.3 Using Windows 10
Re: Query Re listing Text column associated with number colu
a self join is probably the most efficient solution.
replace the two instances of 'MyTable' with the name of your table:
replace the two instances of 'MyTable' with the name of your table:
Code: Select all
select t2.*
from
(select min("Series") mn, max("Series") mx from "MyTable") t1
join
(select "TableID", "Series", "Details" from "MyTable") t2
on t1.mn = t2."Series" or t1.mx = t2."Series"
open office 4.1.14 & LibreOffice 6.4.4.2 x64 using HSQL 1.8.0.10 (Embedded) and HSQL 2.6.0 (Split) on Windows 10