6 Replies Latest reply on Jun 23, 2008 3:55 PM by Newsgroup_User

    Database Entry Comparison

    fs22 Level 1
      My company has a SQL database that serves as the analytics collection for our internal search engine. I am creating an analytics dashboard. One of the things I want to find out is a listing of brand new searches/entries that are new within the last month. Anyone have any tips on how to accomplish this?


        • 1. Re: Database Entry Comparison
          Dan Bracuk Level 5
          Are you collecting the date and time that records are added?
          • 2. Re: Database Entry Comparison
            fs22 Level 1
            Yes it is. within fields entitled, 'SEARCH_DATE' and 'SEARCH_TIME'
            • 3. Re: Database Entry Comparison
              Dan Bracuk Level 5
              the exact syntax is db specific, but the gist of it is:

              select somefields
              from sometables
              where search_date >= 30 days ago
              • 4. Re: Database Entry Comparison
                fs22 Level 1
                But how do I filter the results to find the results that are new. We could have an entry that is at the top of the list, but not necessarily a new search. I want new ones that were not in the list for last month.
                • 5. Re: Database Entry Comparison
                  fs22 Level 1
                  Allow me to resurrect this to see if any of you cangive me direction.

                  I have a database that records searches via our enterprise search engine. There are four analytics I wish to generate...

                  1) Brand new searches in the last month - top ten
                  2) Reoccurring searches - top ten
                  3) Ascending searches (those whose count is increasing) - top ten
                  4) Descending searches (those whos count is decreasing) - top ten

                  I am looking for tips on how to compare database entries like this. For example, in the first one, I need db entries that occurr this month, but not last month.

                  Has anyone ever done this?

                  Any help is appreciated.
                  • 6. Re: Database Entry Comparison
                    Level 7
                    I don't mean to be unhelpful, but... why are you asking a SQL question on a
                    ColdFusion forum?

                    - let us know what you're already tried to do, and the logic behind why you
                    tried what you did, what the outcome was, and how it differed from your
                    - it's virtually impossible to help you on the basis of the info you've
                    provided. No DB schema, no queries, no code. Nothing at all, really.
                    - if you haven't tried anything, it's kinda rude to ask us to do your work
                    for you.
                    - DB / SQL questions are really probably best asked on a more approriate