Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: select statement

    how to write a sql statement on this query
    select all userid, username whose age is more than 10 years and number of login more than 20
    Please help me in solving this query

    Table Name USERS

    user_id number(2)
    user_name varchar2(20)
    DOB date
    total_login number(2)

  2. #2
    Join Date
    Jul 2003
    how about you show us what you ahve so far?
    I think it is reasonable that you do a little work here.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Jan 2004
    Germantown, MD
    SELECT userid, username
    FROM users
    WHERE MONTHS_BETWEEN(sysdate, dob)/12 > 10
    AND total_login > 20;
    Last edited by the Oracle; 08-26-04 at 15:39.
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. "
    - Albert Einstein

Posting Permissions

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