I have the following tables
Computer
_________
ComputerID
ComputerName
Product
_________
ProductID
ProductName
ComputerProduct
________________
ComputerID
ProductID
ProductFile
___________
ProductID
FileID
File
_______
FileID
FileInfo
__________
FileInfoID
FileID
ComputerID
LastUsed
LastUser
AccessNum
DirationInSeconds
DateDiscovered
FileInfo connected to Computer table through ComputerID
and to File table through FileID
FileInfo table can contain multiple records for the dame computerID
I need to retrieve a computer name from Computer Table Where Computer is linked with Product table through ComputerProduct table and where ProductName IN ('Test1','Test2','Test3").
Also, in the same select statement I need to retrieve the following values from FileInfo table:
MAX(LastUsed),
LastUser,
SUM(AccessNum),
SUM(DirationInSeconds)/60 as DurationInMinutes,
and MAX(DateDiscovered)
I need one record per each computer.
Can someone help?
Start Free Trial