I have a table in which there is an update, there are some fields with duplicate data. I want to generalize this data in order to generalize it. How to do this for SQL Server? I will give an example of output and structure below. I tried several different joins, but I saw duplicate data and some errors that I don't understand.
Table structure
- Log file name (string)
- Status (int) - may be 1, 2, 3 depending on the application input
Data
f1, 3, 0 f1, 2, 1 f1, 3, 0 f2, 1, 1 f2, 1, 1 f2, 2, 1 ....
Exit
File | Count of status == 1 | Count of status == 2 f1 | 59 | 43 f2 | 28 | 99 f3 | 23 | 16
source share