cancel
Showing results for 
Search instead for 
Did you mean: 

Combine selection and counting of values from database

dschiener
Participant
0 Kudos
135

Hi there,

I am looking for a solution to combine the selection of values from database and counting them in 1 SQL statement.

Unfortunately I don't get the solution so far by my own :(.

Example:

| matnr | text  |
-----------------
| 1     | test1 |
| 2     | test2 |
| 3     | test3 |

The preferred SELECT should lead to the following result:

| matnr | text  | count |
-------------------------
| 1     | test1 | 3     |
| 2     | test2 | 3     |
| 3     | test3 | 3     |

Any ideas?

BR

View Entire Topic
raymond_giuseppi
Active Contributor
0 Kudos

For recent versions, which SQL expressions/functions did you already try?

raymond_giuseppi
Active Contributor
0 Kudos

Was the WITH already available in 7.50 (and not only from 7.51 on)

dschiener
Participant
0 Kudos

None. There is no built-in SQL function that could help me out here.

No, the statement WITH is not supported :(.