Have a code in MSSQL
SELECT TOP 100 PERCENT Acct, Currency, COUNT(Name) AS NB
FROM Details
GROUP BY Acct, Currency
Please help me by providing the equivalent code in PostgreSQL.
Have a code in MSSQL
SELECT TOP 100 PERCENT Acct, Currency, COUNT(Name) AS NB
FROM Details
GROUP BY Acct, Currency
Please help me by providing the equivalent code in PostgreSQL.
In any database, you would just use:
SELECT Acct, Currency, COUNT(Name) AS NB
FROM Details
GROUP BY Acct, Currency;
The TOP 100 PERCENT
is a no-op. It just returns all the data that would be returned anyway.