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 4097652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:12:04+00:00 2026-05-20T20:12:04+00:00

can someone give me the select query for australian 1 up plan? explanation of

  • 0

can someone give me the select query for australian 1 up plan?

explanation of australian 1 up plan:

say company the company is node “zero”

say “one” is the root affiliate to join a company.(under “zero”)
“two” “three” “four” joins under “one”(i,e with referal id of “one”)

again in simailar manner
“five” “six” “seven” joins under “two”
“eight” “nine” “ten” joins under “three” and
“eleven” “twelve” “thirteen” joins under “four”

hope the diagram is clear in your mind till now (or plz draw it on a paper)

now the plan is every second member who joins under “one” becomes his downline.(here “three” and “four” are downlines of “one”(“two” is not “one’s” downline cz “one” is passing “two” for his successor root “zero”)

not only “three” and “four” are the downline of “one” but also every first member who joins under “three” or “four” (i,e under downline of “one”) are also the downlines of “one”
(i,e “eight and “eleven” are also downline of “one”)

(“five” “six” seven” are not downlines of “one” cz they are not the downline of downline of “one” i means they have joined under “two” who is not a downline of “one” thats why they are not in the tree)

                     one
                      |
    ----------------------------------------------------
    |                          |                       |
    two                       three                   four
     |                         |                       |
  ----------------------      ---------------------    ---------------------
  |      |             |      |       |           |    |        |          |
 five   six        seven      eight   nine      ten    eleven   twelve   thirteen

so if my table has two columns as “user_id” (primary key)
and “referal id” as (which pints to the id under which this new user id is created)

then what will be the select query to find all the downlines of “one”

i will be really greatfull to get the answer.

  • 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-05-20T20:12:05+00:00Added an answer on May 20, 2026 at 8:12 pm

    if oracle you can use connect by clause :
    for turkish : oracle connect by
    for english : oracle connect by

    SELECT tckimlik,adi, SYS_CONNECT_BY_PATH(adi, '->') AS konum
    FROM ailem
    CONNECT BY PRIOR tckimlik=baba_tc
    START WITH baba_tc IS NULL
    

    Result :

    enter image description here

    SELECT  LPAD('-',LEVEL,'-')|| adi sahis,tckimlik,baba_tc,LEVEL
    FROM  ailem
    START WITH baba_tc IS NULL
    CONNECT BY PRIOR tckimlik=baba_tc
    

    Result :

    enter image description here

    hierarchical data in mysql :
    http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone give me a good explanation on the motivation and application of JTA
Can someone give me a query that will return as a result rows ID
This SQL query does not execute. Can someone give the correct syntax? UPDATE PayrollTotals
Can someone please help me in writing the exact query, which can give me
Can someone give me some advice on this? I am reading in an old
Can someone give me a Powershell script that will change the format of all
Can someone give me a birds eye view of backbone, nodejs etc. How do
Can someone give me an example of how I would delete a row in
Can someone give me some info/background info on how I might go about writing
Can someone give me a real-world scenario of a method/function with a string argument

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.