Jump to content

Search the Community

Showing results for tags 'GROUP BY'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 4 results

  1. hi, sorry, i have a question to do...but i know how to write in sql query ....however the answer need to write on relational algebra in query is like : SELECT * FROM operation where r='broken' group by pc having count(pc) >1 ; π id,pc,result ( σ r = 'broken' (operation)) like group by and having clasue...i no idea ... i searched on internet still @@ .... isnt the answer like that, i using split/step by step method to do rel 1 = σ r = 'broken' (operation) rel 2 = σ count(pc)>1 γ pc,count(pc) (rel 1)) rel 3 = π id,pc,result (rel 2 ) thanks
  2. hi there, the following query was developed and works as it should. SELECT ( SELECT COUNT(DISTINCT SP1.bigint_ProspectID, PLS1.smallint_ProspectOrdinal) FROM 10_serviceprospects SP1 LEFT JOIN 13_prospectleadsent PLS1 ON SP1.bigint_ProspectID = PLS1.bigint_ProspectID WHERE PLS1.timestamp_Sent BETWEEN "2013-08-01 00:00:00" AND "2013-08-30 23:59:59" AND SP1.bigint_ServiceID = SS.bigint_ServiceID AND PLS1.bigint_SupplierID = S.bigint_SupplierID ) AS `Previous Month`, ( SELECT COUNT(DISTINCTROW SP2.bigint_ProspectID, PLS2.smallint_ProspectOrdinal) FROM 10_serviceprospec
  3. scgibson

    Distint Records

    I have the following 'status' table which gets updated with a new record at each step of the process. I need a view to return all records with the latest transdate for each prno. Status TransDate PRNo1 2012-01-31 16:19:56.000 11 2012-02-01 10:30:36.000 20 2012-02-01 10:45:01.000 31 2012-02-08 12:30:17.000 42 2012-02-09 12:30:17.000 413 2012-02-15 11:47:42.000 43 2012-02-15 12:50:15.000 4 View needs to return the following Status TransDate PRNo1 2012-01-31 16:19:56.000 11 2012-02-01 10:30:36.000 20 2012-02-01 10:45:01.000 33 2012-
  4. I need some help being a newbie to this game...Running SQL 2008 on W2003. Source table contains the following fields.Name Department Status---- ---------- ------Stuart IT 1Kate IT 4Marc Finance 8Mick Quality 6Stuart IT 8 Report needs to return the count of the status field for each department depending on the status range of numbers, so... status 1 to 8 = 'submitted'status 7 to 8 = 'realised'Thus the report of the above table should look like: Department Submitted Realised---------- --------- --------IT 3 1Finance 1 1Quality 1 0
×
×
  • Create New...