September 12, 2005 at 7:33 am
I need to find out the date the first bit of software was installed, the following query
select distinct(machine),software,date
from devices
group by machine,date
Returns
MachineA 11/09/00
MachineA 21/10/02
MachineB 01/07/03
MachineB 18/07/02
What i need is is one record, so machineA with the earliest software installed, but it is returning all the dates. An example of what I am after is:
MachineA 11/09/00
MachineB 18/07/02
Thanks
September 12, 2005 at 7:48 am
Select Machine, Software, min(date) as FirstInstall
from dbo.Devices
group by Machine, Software
September 12, 2005 at 8:26 am
Thanks, worked a treat
September 12, 2005 at 11:29 am
HTH.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy