PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Pivot Table
Pivot Table
Débuté par scott daughtry, 18 fév. 2024 21:37 - 1 réponse
Posté le 18 février 2024 - 21:37
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!
Membre enregistré
55 messages
Popularité : +2 (2 votes)
Posté le 19 février 2024 - 12:33
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