select *, count(URGdata.vstockno) as cc from (
SELECT *,enter_date as ladate,
(select imageurl from URG_images where stock = vstockno and imagetype = 'V' and urgid = yardid order by imgname limit 1) as imageurl
FROM urg_veh_data left join URGdata on urg_veh_data.vstockno = URGdata.vstockno
urgid in ('IN16','XX00')
and crush_date = '0000-00-00 00:00:00'
and enter_date > NOW() - INTERVAL 30 DAY
where imageurl is not NULL
group by vstockno
order by enter_date desc limit 60
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.