User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
sql_analysis [2018/04/20 11:47]
sql_analysis [2019/01/24 18:55]
daniel [Presence and count of specific mail headers]
Line 52: Line 52:
 <code sql> <code sql>
 select FIELD||':'​||arr[1],​ count(*) select FIELD||':'​||arr[1],​ count(*)
- from (select FIELD, regexp_matches(lines,​ '​(?:​^|\n)'​ || FIELD || ':​\s*([^\n]*)\n', 'g') as arr+ from (select FIELD, regexp_matches(lines,​ '​(?:​^|\n)'​ || FIELD || ':​\s*([^\n]*)',​ 'gi') as arr
        from header, ​        from header, ​
          ​(VALUES ('​X-Priority'​),​ ('​Importance'​),​ ('​Precedence'​),​ ('​Priority'​),​          ​(VALUES ('​X-Priority'​),​ ('​Importance'​),​ ('​Precedence'​),​ ('​Priority'​),​
sql_analysis.txt ยท Last modified: 2019/01/24 18:55 by daniel