How to add numbering in groups of similar records in SQL query?

Good day, there is a table that describes the characteristics of similar devices but with small differences in the properties table consists of the following:

ID; DEVICE; FIELD; VALUE
1 ; the Monitor Model; LG
2 ; the Monitor; the Serial number; 12345
3 ; Monitor; date of issue; 01.01.2020
4 ; the Monitor Model; LG
5 ; Monitor; Serial number; 23456
6 ; Monitor; date of issue; 02.01.2020
7 ; the Monitor Model; LG
8 ; Monitor; Serial number; 34567
9 ; Monitor; date of issue; 03.01.2020

At the exit you need to get the following result:

ID; DEVICE; FIELD; VALUE; GROUP
1 ; the Monitor Model; LG; 1
2 ; the Monitor; the Serial number; 12345; 1
3 ; Monitor; date of issue; 01.01.2020; 1
4 ; the Monitor Model; LG; 2
5 ; Monitor; Serial number; 23456; 2
6 ; Monitor; date of issue; 02.01.2020; 2
7 ; the Monitor Model; LG; 3
8 ; Monitor; Serial number; 34567; 3
9 ; Monitor; date of issue; 03.01.2020; 3

Ie each monitor now has a certain ID, that number of common attributes to a group
You can get as a numerator, for example based on the Model name field (this field is always there, and always first) may request you to react to it and based on it, to do data
April 4th 20 at 12:57
1 answer
April 4th 20 at 12:59
Mmm... that have things in common, RANK but rather just the number of unique field values, without repetition.

Ie in my case it turns out to make the next

ID; DEVICE; FIELD; VALUE; RANK
1 ; the Monitor Model; LG; 1
2 ; the Monitor; the Serial number; 12345; 2
3 ; Monitor; date of issue; 01.01.2020; 3
4 ; the Monitor Model; LG; 1
5 ; Monitor; Serial number; 23456; 2
6 ; Monitor; date of issue; 02.01.2020; 3
7 ; the Monitor Model; LG; 1
8 ; Monitor; Serial number; 34567; 2
9 ; Monitor; date of issue; 03.01.2020; 3 - thea88 commented on April 4th 20 at 13:02
@thea88, prompt, and on what basis should group? - Lauretta commented on April 4th 20 at 13:05
Sign just the same and no, nothing to cling to, information of the same type that went to the second monitor, you can probably understand just because once again the line appeared where IFIELD same Model
Except that this is the only symptom
And accordingly, when she first appears is also a sign, i.e., the following is a description of the first instance of the monitor - thea88 commented on April 4th 20 at 13:08
@thea88, then maybe this feature need to create and then populate using the procedure - Lauretta commented on April 4th 20 at 13:11
@thea88, I on mail threw off the sample procedure - Lauretta commented on April 4th 20 at 13:14

Find more questions by tags MySQLSQLPL/SQL