How to order by with group by in mysql

One way to do this is with a bunch of while loops and hitting the DB over and over, or selecting a crap load of data and just dropping out everything but the most recent inventory count manually. Both of these are viable solutions with a lot of overhead, but what I really want is just a silver bullet SQL statement that does this for me. I think I have it.

What I initially envisioned was:

SELECT *
FROM INVENTORY
ORDER BY vendors_no,
timestamp DESC
GROUP BY vendors_no,
product_no Continue reading

Add DISQUS Comment System In Blogger

Add DISQUS Comment System In Blogger
Integrating DISQUS In Blogger
After telling you the information of this comment form, now you may want to integrate it in your blog and that’s the topic of our today’s post. But without the information the post looks like straw meal and we’ve added some spices as information. Not funny ? Well, let’s begin the tutorial.

Go To Disqus >> Click On “Get This On Your Site” Button.
There You Will See The Registration Form. Fill All The Fields To Sign Up.

Continue reading