User Profile

Collapse

Profile Sidebar

Collapse
loffing4
loffing4
Last Activity: Nov 4 '08, 04:48 PM
Joined: Jul 21 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • loffing4
    replied to Question About Inner Joins and COUNT()
    Perfect! I just had to add a column alias and an order by clause.

    The nested select method wasn't one I was familiar with.
    See more | Go to post

    Leave a comment:


  • loffing4
    replied to Question About Inner Joins and COUNT()
    Anybody have an idea?
    See more | Go to post

    Leave a comment:


  • loffing4
    replied to Question About Inner Joins and COUNT()
    The full table structures are below. Any query I wrote isn't worth posting as I'm not really sure how to get started. I would think I'd need to inner join the tables based on the member id, but I couldn't get it to work. I'm pretty new to mySQL and databases in general.

    Code:
    CREATE TABLE `members` (
      `member_id` int(10) NOT NULL auto_increment,
      `first_name` varchar(50) NOT NULL,
      `last_name` varchar(50)
    ...
    See more | Go to post

    Leave a comment:


  • loffing4
    started a topic Question About Inner Joins and COUNT()

    Question About Inner Joins and COUNT()

    I'm trying to write a query that selects the top five members of a forum based on how many total points they have. A member's total points are calculated as follows: (3 * # answers posted) + (10 * # questions posted) + (15 * # members recruited). The relevant parts of the tables are listed below:

    Code:
    table members (
         member_id int(10),
         ...
         recruiter_id int(10)  /* id of member who recruited
    ...
    See more | Go to post
No activity results to display
Show More
Working...