logo       
Google Custom Search
    AddThis Social Bookmark Button

Cross-classified table: msg#00165

Subject: Cross-classified table
Hi,
I'm looking for the correct syntax of getting a cross-classified table from my SELECT statement.

Let's pretend I have this table:


origin        sex
----------------
USA male USA female
China      male
China      male
UK           male
USA        male


and I want as result something like:

              male      female

USA 2 1 China 2 0
UK           1            0


How can I get this?

Best regards,
alex



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>