Re: multi count

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 07/23/04


Date: Fri, 23 Jul 2004 10:11:14 -0400

Can you please show us table structure, sample data, and desired results.
Narrative is usually not enough information and tends to make the real issue
more difficult to uncover.

http://www.aspfaq.com/5006

-- 
http://www.aspfaq.com/
(Reverse address to reply.)
"Jeff" <gig_bam_takemeout_@verizon.net> wrote in message
news:uEvMY5LcEHA.3988@tk2msftngp13.phx.gbl...
> I need help in writing a statement with the following info.
>
> the field name i want to count is called country
> i want to count each country and display the totals of each.. in one
> statement..
> i have the following countries:
> USA
> Canada
> UK
> Austrialia
> New Zealand
> Denmark  ( and will add new countries as needed)
>
> i tried this type of statement, but isnt working
>
> SELECT COUNT(Select country from rounds where country = 'USA') as Val1
>
> am i am thr right track here? or all messed up as i believe i am.
> Thanks
> Jeff
>
>


Relevant Pages

  • Re: exact value from supplied Row and Column data
    ... Please post your sample data, ... year span). ... for that country then across that row to the cell for the year (e.g. ... Column A lists varying interest rates and the row 2 lists ...
    (microsoft.public.excel.worksheet.functions)
  • Re: math query problem
    ... >nr referes to regions in a country ... Hi Rob, ... Thanks for providing sample data and table structure. ...
    (microsoft.public.sqlserver.setup)
  • Re: selecting rows from a table
    ... I am not sure I understand what is needed, since you start with statement that the columns are not NULL and then provide sample data with NULL values. ... SELECT COALESCE(city, '') AS city, ... COALESCE(country, '') AS country ... Plamen Ratchev ...
    (comp.databases.ms-sqlserver)
  • Re: Peter Watts
    ... Canada for lunch while visiting my girlfriend in Detroit: ... We paid our toll and rolled up to the border guard, ... cheques into the country, and making us mighty grateful we'd gotten the ... Canadian citizenships for being so brave and honest to the border guard, ...
    (rec.music.filk)
  • Re: Another Sterling Massachusetts Alum
    ... but I would suspect that Canada got more ... Here are a few facts for you to chew on regarding your own country. ... took action to hide and help Jewish refugees escape with their ... up to dictators and terrorists since at least Hitlers days, ...
    (alt.sports.baseball.ny-yankees)