tHud Posted February 4, 2011 Share Posted February 4, 2011 phpMyAdmin 2.6.0-pl3 MySQL 4.1.22-standard-log Hello I need to generate a report that will only display the latest date that a device was serviced. Each piece of equipment will have several job sheets attached to it but I would like to display only the latest one. For instance, in the list below I would like the monitor & printer to be listed - but also only the pump serviced on 25/12/2010. I'd appreciate if someone could guide me on this Device Serviced pump 01/06/2009 pump 25/12/2010 monitor 01/02/2010 printer 01/04/2010 pump 02/02/2010 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/226664-query-to-supress-older-dates/ Share on other sites More sharing options...
DarkKnight2011 Posted February 4, 2011 Share Posted February 4, 2011 Here you go.. try this select device, max(serviced) from table group by device any problems let me know but remember to change field/table names to match your own Quote Link to comment https://forums.phpfreaks.com/topic/226664-query-to-supress-older-dates/#findComment-1169807 Share on other sites More sharing options...
tHud Posted February 4, 2011 Author Share Posted February 4, 2011 I can't try that on the work server until Monday, but I'm quite sure it will work. Thanks very much (I'll mark SOLVED on Monday ) Quote Link to comment https://forums.phpfreaks.com/topic/226664-query-to-supress-older-dates/#findComment-1170014 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.