473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

reverse group by in mysql

Hi again,

is it possible to change the order of GROUP BY.

e.g. i have 3 rows of data all related to unit number 313025 as below

313025 - Red - Yellow - NoData
313025 - Red - Green - Green
313025 Green - Green - Green

When i do a GROUP BY Unit i get the following

313025 - Red - Yellow - NoData

or the fist one in the group that was entered, what i want is on a GROUP BY for it to show up the last record

Any ideas would be great

Thanks

Andrew
Nov 12 '08 #1
1 3302
mwasif
802 Expert 512MB
This is called groupwise maximum. Take a look at this article.
Nov 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Google Mike | last post by:
You know, while working on my moonlight corporation's LAMP project at home this weekend, I couldn't help but wonder if people writing similar projects are solving similar problems with having to...
9
by: frizzle | last post by:
Hi there, Short question: Is there any way, to reverse the result of a mysql query? Explanation: If i have eg. 20 records, all with their own id of course, select 5 with limit, and order...
13
by: Brad Tilley | last post by:
A friend of mine wrote an algorithm that generates strings. He says that it's impossible to figure out exactly how the algorithm works. That may be true, but I think if I had enough sample strings...
0
by: Ask Bjørn Hansen | last post by:
Hi, I am trying to control which element gets picked when I do a group by, but I can't figure out how to do it. First some example data: CREATE TABLE t ( id int not null primary key...
17
by: Sulu's Beard | last post by:
Hey gang, I'm evaluating the CA ERWin product for an upcoming data warehousing project. I'm most excited about the reverse engineering aspect of this system. I've sucessfully tested it on a...
7
by: Martin | last post by:
Hi, I am trying to reverse engineer some software in C. Ideally I would like to use a free program that would scan for function calls and map the route of function calls in programs in a tree...
6
by: bluekarthik | last post by:
Hi , Hi, has anyone tried reverse engineering a .drv / .dll file ? Plz tell me some techniques to reverse engineer .drv / .dll files !! karthik bala guru
13
by: Aamir Mahmood | last post by:
What could be the fastest method to reverse a string. Speed really matters for my application. Average size of string that comes to my function is around 200K - 300K. Currently i am using the...
3
seshu
by: seshu | last post by:
hi guys this might be a simple one for you but here i badly need it i have a table in mysql which has a column with data type date there date format is yyyy-mm-dd but here in vb date formate is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.