PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Pivot Table
Pivot Table
Started by scott daughtry, Feb., 18 2024 9:37 PM - 1 reply
Posted on February, 18 2024 - 9:37 PM
Table has a 'Country' field defined. Populated with 10,000,000 records with various values (e.g. Belize, France, Spain, USA)

I need to build a list of unique Country names and how many records exist for each Country.

Sounds simple, but I've chased my tail for 3 days trying to get a Pivot Table or a Crosstab report to do this simple output:

Belize 14
France 1,001
Spain 14,246
USA 72,339

A simple two column output that emulates what I can do in Excel with it's PivotTable function by selecting the Country column and a random second column to build the Pivot Table. There are zero examples I've found within WinDev or various Windev forums to show how to accomplish this.

HELP!
Registered member
55 messages
Popularité : +2 (2 votes)
Posted on February, 19 2024 - 12:33 PM
Hello Scott,
you have to use a query

In SQL you have something like this:

SELECT country, COUNT(*) AS howmany
FROM mytable
GROUP BY country
ORDER BY country


Hope this helps
Andrea