facebook Twitter RSS Feed YouTube StumbleUpon

Home | Forum | Chat | Tours | Articles | Pictures | News | Tools | History | Tourism | Search

 
 


Go Back   BanglaCricket Forum > Miscellaneous > Support

Support Help & Support

Reply
 
Thread Tools Display Modes
  #1  
Old April 2, 2010, 04:29 PM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429
Default SQL query help

What would be the query for this :-
" Produce a list of all books having the same title. The list should include the title, ISBN, year of publication, type of binding and the language of the book."
Reply With Quote
  #2  
Old April 2, 2010, 04:53 PM
AsifTheManRahman's Avatar
AsifTheManRahman AsifTheManRahman is offline
Super Moderator
BC Editorial Team
 
Join Date: February 12, 2004
Location: Canada
Favorite Player: Ice Man, Chatter Box
Posts: 27,672

SELECT title, ISBN, yearOfPublication, typeOfBinding, language FROM Books ORDER BY title

...assuming the name of your table is "Books". Alternatively you can use GROUP BY (as opposed to ORDER BY). Is that what you're looking for?
__________________
Screw the IPL, I'm going to the MLC!
Reply With Quote
  #3  
Old April 2, 2010, 05:10 PM
AsifTheManRahman's Avatar
AsifTheManRahman AsifTheManRahman is offline
Super Moderator
BC Editorial Team
 
Join Date: February 12, 2004
Location: Canada
Favorite Player: Ice Man, Chatter Box
Posts: 27,672

In fact, a better way to do this might be:

SELECT title, ISBN, yearOfPublication, typeOfBinding, language FROM Books WHERE title in (SELECT title FROM Books GROUP BY title HAVING (COUNT(title) > 1))

...assuming you're looking for duplicates.
__________________
Screw the IPL, I'm going to the MLC!
Reply With Quote
  #4  
Old April 2, 2010, 07:19 PM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429

Quote:
Originally Posted by AsifTheManRahman
In fact, a better way to do this might be:

SELECT title, ISBN, yearOfPublication, typeOfBinding, language FROM Books WHERE title in (SELECT title FROM Books GROUP BY title HAVING (COUNT(title) > 1))

...assuming you're looking for duplicates.
Yay, Its work.
Thanks a lot Asif vai.
Reply With Quote
  #5  
Old April 2, 2010, 07:55 PM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429

One more:
How will I count multiple column from same table?
For instance,
Library item can be borrowed under borrowing category of short loan and ordinary loan. How would I produce a list of all library item under that category. And output will be the name of category and total number of item.

So, I have the table name "Borrowing_catg". This are the four collumn: b_catg_id, Shortloan_id, ordinaryL_id and library_item.
Reply With Quote
  #6  
Old April 2, 2010, 08:05 PM
Zunaid Zunaid is offline
Administrator
 
Join Date: January 22, 2004
Posts: 21,575

Omio - how much of the homework done?


^^ do a join
Reply With Quote
  #7  
Old April 2, 2010, 08:13 PM
Orpheus's Avatar
Orpheus Orpheus is offline
Cricket Legend
 
Join Date: July 25, 2002
Favorite Player: Tamim, Riyad, Ashraful
Posts: 5,836

Omio got a outsourcing project from a financially struggling library in India?
__________________
Reply With Quote
  #8  
Old April 2, 2010, 08:22 PM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429

Quote:
Originally Posted by Zunaid
Omio - how much of the homework done?


^^ do a join
Lol, 50% done. Asif vai is real tiger.
Reply With Quote
  #9  
Old April 2, 2010, 08:22 PM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429

Quote:
Originally Posted by Orpheus
Omio got a outsourcing project from a financially struggling library in India?
hahahaha
Reply With Quote
  #10  
Old April 2, 2010, 10:34 PM
Kabir's Avatar
Kabir Kabir is offline
Cricket Guru
 
Join Date: September 3, 2006
Location: Mississauga, Ontario
Favorite Player: Sakib - the real Tiger
Posts: 11,139

Wasn't Omio banned?
What's the update query for unbanning?

Good to have you back bro.
__________________
cricket is a PROCESS, not an EVENT or two. -- Sohel_NR
Fans need to stop DUI (Dreaming Under Influence)!
Reply With Quote
  #11  
Old April 3, 2010, 04:51 AM
Omio's Avatar
Omio Omio is offline
Banned
 
Join Date: February 25, 2006
Location: London, UK
Favorite Player: Only Ashraful & Me
Posts: 4,429

Quote:
Originally Posted by Kabir
Wasn't Omio banned?
What's the update query for unbanning?

Good to have you back bro.
Thanks Kabir vai .
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On



All times are GMT -5. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
BanglaCricket.com
 

About Us | Contact Us | Privacy Policy | Partner Sites | Useful Links | Banners |

© BanglaCricket