diff --git a/queries/auditapp_last7days.json b/queries/auditapp_last7days.json index 69bc2a9..64e9d92 100644 --- a/queries/auditapp_last7days.json +++ b/queries/auditapp_last7days.json @@ -1,40 +1,51 @@ { "name": "AuditApp_Last7Days", - "query": "SELECT \n\t\t O.KeyValue 'ID'\n , O.DisplayName 'Name'\n\t\t, AU.AttributeName 'Attribute'\n\t\t, AU.ValueOld 'Old'\n , AU.ValueNew 'New'\n , OP.Name 'Operation'\n , OM.DateTime 'Operation DT'\n , AC.DateTime 'Activity DT'\n , AT.Name 'Activity'\n , ST.SystemName 'System'\n , ST.TableName 'Table'\nFROM AttributeUpdates AU\nINNER JOIN ObjectMutations OM ON OM.ID = AU.ObjectMutationID\nINNER JOIN Operations OP ON OP.ID = OM.OperationID\nINNER JOIN Activities AC ON AC.ID = OM.ActivityID\nINNER JOIN ActivityTypes AT ON AT.ID = AC.ActivityTypeID\nINNER JOIN Objects O ON O.ID = OM.ObjectID\nINNER JOIN SystemTables ST ON ST.ID = O.SystemTableID\nWHERE datetime(om.DateTime) > CURRENT_TIMESTAMP-7\nORDER BY OM.DateTime DESC\nLIMIT 500", + "query": "SELECT \n\t\t O.KeyValue 'ID'\n , O.DisplayName 'Name'\n\t\t, AU.AttributeName 'Attribute'\n\t\t, AU.ValueOld 'Old'\n , AU.ValueNew 'New'\n , OP.Name 'Operation'\n , OM.DateTime 'Operation DT'\n , AC.DateTime 'Activity DT'\n , AT.Name 'Activity'\n , ST.SystemName 'System'\n , ST.TableName 'Table'\nFROM AttributeUpdates AU\nINNER JOIN ObjectMutations OM ON OM.ID = AU.ObjectMutationID\nINNER JOIN Operations OP ON OP.ID = OM.OperationID\nINNER JOIN Activities AC ON AC.ID = OM.ActivityID\nINNER JOIN ActivityTypes AT ON AT.ID = AC.ActivityTypeID\nINNER JOIN Objects O ON O.ID = OM.ObjectID\nINNER JOIN SystemTables ST ON ST.ID = O.SystemTableID\nWHERE datetime(om.DateTime) > DATE(CURRENT_TIMESTAMP, '-7 days')\nORDER BY OM.DateTime DESC\nLIMIT 500", "params": [], "columns": [ { - "name": "ID" + "name": "ID", + "type": 0 }, { - "name": "Name" + "name": "Name", + "type": 0 }, { - "name": "Attribute" + "name": "Attribute", + "type": 0 }, { - "name": "Old" + "name": "Old", + "type": 0 }, { - "name": "New" + "name": "New", + "type": 0 }, { - "name": "Operation" + "name": "Operation", + "type": 0 }, { - "name": "Operation DT" + "name": "Operation DT", + "type": 0 }, { - "name": "Activity DT" + "name": "Activity DT", + "type": 0 }, { - "name": "Activity" + "name": "Activity", + "type": 0 }, { - "name": "System" + "name": "System", + "type": 0 }, { - "name": "Table" + "name": "Table", + "type": 0 } ] }