So I am trying to pull the first date for each specific ID that I have. I feel like I need a limit, but I need the first result for the date column but I need all ID's returned. This is what I have but am getting an error message about the Limit. But I am very new to this and not sure if a limit is even what I need. Any help would be greatly appreciated!

selectdistinct customerid,--item,transactiondt

from transactions

where item in(10014623, 10014653, 10014637, 10014624, 10014641)

group by customerid,transactiondt

order bycustomeridtransactiondt ASC, (LIMIT 0,1)

*****some customerid's only have one date, but some have several (ex. customerid 1 might have transactiondt 1/5, 2/7, and 3/12 but I just need the 1/5 returned)

If you need to get only those two columns, you can use the MAX (or MIN or another aggregate function) as shown below. If you needed to get other columns, we will have to use a different approach:

SELECT customerid,
--item,
MAX(transactiondt) AS max_transactiondt
FROM transactions
WHERE item IN (10014623, 10014653, 10014637, 10014624, 10014641)
GROUP BY
customerid
ORDER BY
customerid,
max_transactiondt