Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8134439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:01:52+00:00 2026-06-06T10:01:52+00:00

If I have three different tables like this table_1 Field 1: victories Field 2:

  • 0

If I have three different tables like this

table_1

Field 1: victories
Field 2: name

table_2

Field 1: name
Field 2: birthday

Now I would want to get the birthday of the person with the most victories.

So I would do something like this (pseudo code):

select victories from table_1 and sum_it_all
get name and pass name to table_2
select birthday from table_2 where name

Ok, this is pretty ugly pseudo code, but I hope you get the point.

Using Andomar’s solution works fine.
Now I tried to nest another table in it, like this though:

select address
from table_3
where birthday = 
    (
    select  birthday
    from    table_2
    where   name = 
            (
            select  name
            from    table_1
            group by
                name
            order by
                sum(victories) desc
            limit   1
            )
    )

I do get a correct answer, but for some reason also get a null back. And how would I output the sum of victories?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:01:55+00:00Added an answer on June 6, 2026 at 10:01 am
    select  birthday
    from    table_2 t2
    where   name = 
            (
            select  name
            from    table_1 t1
            order by
                    victories desc
            limit   1
            )
    

    If one user can have multiple rows in table_1, you’d have to sum the victories:

    select  birthday
    from    table_2 t2
    where   name = 
            (
            select  name
            from    table_1 t1
            group by
                    name
            order by
                    sum(victories) desc
            limit   1
            )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three tables named Item, Event, and Seat, constructed like this: Item Id
I have a database that has two tables, these tables look like this codes
For instance, I want to have a html form that looks like this: <table>
I have form like this: <form method=POST> <p> Nazwa kategorii: <br /> <input name=NazwaKat
If i have SQL Server tables like this: Location ---------- LocationId int PK Field1
I have a query that aggregates and groupes from 2 different tables: SELECT co.name
Say I have these three tables: Table: Baskets id | name 1 Sale 2
I have a table that has three different date columns, so I set each
I have three different List collections. How can I show them in one ListBox
I have three different configurations on my project, all three do not require all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.