Re: Selecting rows from a distinct selection of one field

From: Uri Dimant (urid_at_iscar.co.il)
Date: 12/09/04


Date: Thu, 9 Dec 2004 12:20:06 +0200

Adam
Do you really think that we will be ablt to help you from your narrative?
Please post DDL + sample data + desired result.

"Adam Smith" <private@hotmail.com> wrote in message
news:ehDM0bd3EHA.2804@TK2MSFTNGP15.phx.gbl...
> I'm not that new to SQL, but still I can't figure this out.
> I'm writing some routines to check through IIS logs.
> After batch importing the logs I end up with 16 fields. Field 2 is the IP
> addresses of our users. I can distinct this field and get all IPs that
> access our website.
>
> What I then want to do, is using this list of ip's pull out 1 sample row
for
> each IP.
> How do I go about doing this in pure sql (if I'd done it in ado I'd be
done
> by now).
> Idealy I'm looking for a fast hitting sql query, as you can imagine the
logs
> can be quite large at times.
>
> Thanks in advance
>
> --
> Regards,
> Adam Smith
> Assistant Computer Technician
> Phone: +44 (0)20-8251-1332
> E-mail: adam@101cd.com
>
> 101cd.com
> 11 Keeley Road
> Croydon
> CR0 1TF
>
>



Relevant Pages

  • Re: elegant way to compute stdev
    ... Please post DDL, so that people do not have to guess what the keys, ... Sample data is also a good idea, ... anything with SQL, ... A normalized schema will save you an incrediable amount of work. ...
    (microsoft.public.sqlserver.programming)
  • Re: Query to extract the latest version of a record
    ... Chris: Wow! ... > The origianl SQL, realigned for readability. ... > above because those columns were not included in the sample data. ... > The table name is lengthy, so I used table aliases. ...
    (microsoft.public.access.queries)
  • Re: Linking records together
    ... the sample data is too easy. ... We need to track work items across several existing applications. ... SQL> create table event_track( ... SQL> column start_item format a10 ...
    (comp.databases.oracle.misc)
  • Re: Query to extract the latest version of a record
    ... > I have an audit table set up from which I want to extract the ... > What I want to do is extract the latest "EditTo"s for all records ... The origianl SQL, realigned for readability. ... above because those columns were not included in the sample data. ...
    (microsoft.public.access.queries)
  • Re: Automated analysis of logs?
    ... > into (especially IIS logs) and get not only statistics, ... save output in some various format like XML, IIS log or directly to the SQL ... Is SPAM over-loading your e-mail server, ... SurfControl E-Mail Filter is flexible, ...
    (Security-Basics)

Quantcast