Results 1 to 8 of 8
  1. #1
    Join Date
    May 2012
    Posts
    117

    can we me this smart query?

    There is a table where in we record student name, lecture subject and presenting date since last year.
    We need a query to show all the students who have made a lecture. We want the query to remove a lecturer who has presented less than a month on the same topic. For example, John made a lecture on politics on 1st August and then he again presented the same lecture on 15 August. In this case we want the second record not to be shown. However if he presents again on politics on 2nd of September it will be shown on the query.
    Thank you,
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    1. student criteria >"1"
    2. subject criteria Is Not Null
    3. date criteria Between Date() And DateAdd("M",-1,Date())

    Hope this helps.

  3. #3
    Join Date
    May 2012
    Posts
    117
    thank you burrina,
    i am quite late to reply,
    studet is a name, can we still difine its criteria to be more than one?
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  4. #4
    Join Date
    Nov 2011
    Posts
    413
    Wow, yes very late! I have slept since then. Here is my demo, you can work with it and see if it will help you.

    Good Luck,
    Attached Files Attached Files

  5. #5
    Join Date
    May 2012
    Posts
    117
    Dear Burrina,
    thank you very much for your time,
    the query is expected to show this result:

    4,bubba,books,9/1/2012
    1,bubba,books,10/15/2012
    2,forest,fruit,11/15/2012

    records with the same student name and subject will not be shown if the it is presented sooner than a month from the previous lecture.
    please let me provide an other example:

    table name: student lectures
    fields: ID, studentname, lecture, date
    records:
    1, john, politics, 1/1/12
    2,steve, politics,20/1/12
    3, jack, economics,21/1/12
    4,jack,politics,22/1/12
    5,john,economics,22/1/12
    6,john, politics, 25/1/12
    7,john,politics,3/2/12

    based on our definition the query will show all the records except the 6th one.
    thank you
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  6. #6
    Join Date
    Nov 2011
    Posts
    413
    I really don't have any more time to invest in this,sorry. Maybe get someone with a little more experience. I am still a little vague as to what you exacty want anyway.

    Good Luck With Your Project.

  7. #7
    Join Date
    May 2012
    Posts
    117
    thank you for ur time bdw

  8. #8
    Join Date
    Nov 2011
    Posts
    413
    Your Welcome.

Posting Permissions

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