Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Select the min of the max from a subquery

Hi Qlikers,

I have a table


DeviceID, EventDate, FirmwareVersion

This table gets refreshed regularly so a new event does not correspond to a new firmware. I want to have in a table DeviceIdD vs latest firmware version vs the date it detected the firmware.

In SQL I would do it like this


select e.DeviceID, e.FirmwareVersion, min(e.EventDate) DateFirmwareDetected

from Events e

inner join


    select ev.DeviceID, ev.FirmwareVersion

    from Events ev

    inner join


        select DeviceID, max(EventDate) EventDate

        from Events

        group by DeviceID

        ) a

    on ev.DeviceID = a.DeviceID and ev.EventDate = a.EventDate

) b

on e.DeviceID = b.DeviceID and e.FirmwareVersion = b.FirmwareVersion


Can anybody help with putting this in Qlik?



Labels (3)
1 Reply

Would you be able to share a sample of data and the output you expect to see from it?