Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •