Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-20-2012, 10:47 AM   PM User | #1
minazfath
New Coder

 
Join Date: Oct 2011
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
minazfath is an unknown quantity at this point
Need Help to write SQL query

Hi ALL,

I am a basic programmer in Mysql,I hope someone help me

I have a table as below

Code:
Product-Name	BrandName	Size	Price
T-Shirt		Rebel		36	20euros
T-Shirt		Rebel		38	25euros
T-Shirt		Rebel		40	30euros

T-Shirt		Benina	38	15euros
T-Shirt		Benina	40	24euros


Pant			Jack 		36	20euros
Pant			Jack		38	25euros
Pant 			Jack		40	28euros
and the result would be like this

Code:
Product-Name	BrandName	Size	Price

T-Shirt		Rebel		36	20euros
					38	25euros
					40	30euros
							
			Benina	38	15euros	
					40	24euros
							
Pant			Jack		36	20euros					
					38	25euros
					40	30euros
I don't know How to write a query.

Thanyou all.
minazfath is offline   Reply With Quote
Old 01-20-2012, 01:09 PM   PM User | #2
Keleth
Senior Coder

 
Join Date: Jun 2008
Location: New Jersey
Posts: 2,353
Thanks: 45
Thanked 247 Times in 244 Posts
Keleth is on a distinguished road
So are you looking to group the prices? Because what you have here seem to be a display issue, not a query issue. You're pulling the same information, you're just showing it differently. And if that's the case, its about whatever server side/programming language you're using, not about the database.
Keleth is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:45 AM.


Advertisement
Log in to turn off these ads.