Skip to main content
Known Participant
June 10, 2008
Question

Database Entry Comparison

  • June 10, 2008
  • 5 replies
  • 512 views
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?

Thanks,

~Clay
This topic has been closed for replies.

5 replies

Inspiring
June 23, 2008
I don't mean to be unhelpful, but... why are you asking a SQL question on a
ColdFusion forum?

Suggestions:
- 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
expectations.
- 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
forum.

--
Adam
fs22Author
Known Participant
June 23, 2008
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.
fs22Author
Known Participant
June 11, 2008
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.
Inspiring
June 11, 2008
the exact syntax is db specific, but the gist of it is:

select somefields
from sometables
where search_date >= 30 days ago
Inspiring
June 11, 2008
Are you collecting the date and time that records are added?
fs22Author
Known Participant
June 11, 2008
Yes it is. within fields entitled, 'SEARCH_DATE' and 'SEARCH_TIME'