Results 1 to 7 of 7
  1. #1
    Join Date
    May 2012
    Posts
    4

    Unanswered: Need help with Query...

    Hello everyone, I am new to the Query world and am having some trouble writing a practice query. I need the query to select the users email address, from a AllSubscribersActive list, where (this is where I need help) their click activity is within the past year. here is the little that I have so far...
    select EmailAddress
    from AllActiveSubscribers
    where (part i am unsure of) click_activity_all = 1 AND (dont know how to determine within year or not)

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    It is a challenge to write SQL when table name & column names are not known.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2012
    Posts
    4

    Table names/Column names

    Table Name
    List_Subscriber
    ListID = 10630
    _Click data
    _Open data

    Column Names
    EmailAddress
    CreatedDate > '05/08/2011'

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Quote Originally Posted by nrdixon View Post
    Table Name
    List_Subscriber
    ListID = 10630
    _Click data
    _Open data

    Column Names
    EmailAddress
    CreatedDate > '05/08/2011'
    How/why is there no mention of "AllActiveSubscriber" in above?
    How/why is there no mention of "click_activity_all" in above?

    >select EmailAddress
    >from AllActiveSubscribers
    >where (part i am unsure of) click_activity_all = 1 AND (dont know how to determine within year or not)

    can you do similar to below?
    Code:
    07:23:16 SQL> desc emp
     Name					   Null?    Type
     ----------------------------------------- -------- ----------------------------
     EMP_ID 					    NUMBER(5)
     EMP_NAME					    VARCHAR2(10)
     EMP_SAL					    VARCHAR2(30)
     MEP_HIREDATE					    DATE
     COMM						    NUMBER
    
    07:23:20 SQL>
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2012
    Posts
    4

    Update

    Table and column names were not known when posted.

  6. #6
    Join Date
    May 2012
    Posts
    4

    Update

    Here's my update...
    select EmailAddress
    from List_Subscribers join _Click data
    where CreatedDate > '05/08/2011'
    AND ListID = 10630

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Read The Fine Manual to learn valid syntax for SELECT

    SELECT
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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