Search Result

Collapse
3 results in 0.0031 seconds.
Keywords
Members
Tags
top
  •  

  • amilcar
    started a topic How can I do a "Grouped TOP 1"?

    How can I do a "Grouped TOP 1"?

    I dont know how to do this, given this table:

    Code:
    -----------------------------------
    CaseId | User  | Timestamp
    -----------------------------------
       1   |   1   | 01/26/2011
       2   |   3   | 03/12/2011
       3   |   2   | 03/20/2011
       4   |   1   | 04/16/2011
       5   |   3   | 05/17/2011
       6   |   1   | 05/06/2011
       7   |   1   | 08/18/2011
    What I need to do...
    See more | Go to post

  • Why is SELECT TOP 200 returning more rows than 200?

    Here is my query:

    Code:
    SELECT TOP 200 tblCallLog.tblCallLog_callDate, (tblClients.tblClients_firstName & ' ' & tblClients.tblClients_lastName & ' ' & tblClients.tblClients_sfx) AS clientName, 
    tblClients.tblClients_mailingAddress, (tblClients.tblClients_city & ', ' & tblClients.tblClients_state & ' ' & tblClients.tblClients_zip) AS addLine2, 
    tblCallLog.tblCallLog_dvdTractRequested,
    ...
    See more | Go to post

  • charli
    started a topic Query for average of the last 10 records

    Query for average of the last 10 records

    I have a table of Waste IDs, with a relationship with a second table of Waste Weights:
    WasteIDs
    Code:
    id  name
    1. Paper
    2. Cardboard
    3. Cans
    WasteWeights:
    Code:
    Id   date   kg
    1. 1/1/09 12
    1. 1/2/09  24
    2. 1/1/09  2
    I want to look up the last 10 wasteweights for an id, and get an average.
    So I can do:
    Code:
    SELECT avg(weight)
    FROM (SELECT TOP 10 weight
          FROM
    ...
    See more | Go to post
    Last edited by NeoPa; Jun 23 '09, 01:51 PM. Reason: Please use the [CODE] tags provided.
Working...