Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.35 KB | None | 0 0
  1. SELECT
  2. sessions.target_id AS "data.target_id"
  3. ,sessions.device_id AS "data.device_id"
  4. ,sessions.nativeSessionName AS "data.nativeSessionName"
  5. ,sessions.terminal AS "data.terminal"
  6. ,sessions.username AS "data.username"
  7. ,sessions.displayName AS "data.displayName"
  8. ,sessions.active AS "data.active"
  9. ,sessions.created AS "data.created"
  10. ,sessions.updated AS "data.updated"
  11. ,sessions.etag AS "data.etag"
  12. ,sessions.online AS "data.online"
  13. ,sessions_index.id
  14. ,sessions_index.etag
  15. ,sessions_index.deleted
  16. ,sessions_activegroups.content AS "activegroups.content"
  17. ,sessions_activegroups.updated AS "activegroups.updated"
  18. ,sessions_activegroups.etag AS "activegroups.etag"
  19. ,sessions_activepolicies.content AS "activepolicies.content"
  20. ,sessions_activepolicies.updated AS "activepolicies.updated"
  21. ,sessions_activepolicies.etag AS "activepolicies.etag"
  22. ,sessions_applications.content AS "applications.content"
  23. ,sessions_applications.updated AS "applications.updated"
  24. ,sessions_applications.etag AS "applications.etag"
  25. ,sessions_directive.content AS "directive.content"
  26. ,sessions_directive.updated AS "directive.updated"
  27. ,sessions_directive.etag AS "directive.etag"
  28. ,sessions_properties.content AS "properties.content"
  29. ,sessions_properties.updated AS "properties.updated"
  30. ,sessions_properties.etag AS "properties.etag"
  31. FROM
  32. sessions LEFT JOIN sessions_index
  33. USING (id) LEFT JOIN sessions_activegroups
  34. USING (id) LEFT JOIN sessions_activepolicies
  35. USING (id) LEFT JOIN sessions_applications
  36. USING (id) LEFT JOIN sessions_directive
  37. USING (id) LEFT JOIN sessions_properties
  38. USING (id)
  39. WHERE
  40. sessions_index.deleted IS NOT NULL
  41. AND sessions_index.id IS NOT NULL
  42. AND sessions.id IS NOT NULL
  43. AND sessions.etag > : since
  44. UNION
  45. SELECT
  46. sessions.target_id AS "data.target_id"
  47. ,sessions.device_id AS "data.device_id"
  48. ,sessions.nativeSessionName AS "data.nativeSessionName"
  49. ,sessions.terminal AS "data.terminal"
  50. ,sessions.username AS "data.username"
  51. ,sessions.displayName AS "data.displayName"
  52. ,sessions.active AS "data.active"
  53. ,sessions.created AS "data.created"
  54. ,sessions.updated AS "data.updated"
  55. ,sessions.etag AS "data.etag"
  56. ,sessions.online AS "data.online"
  57. ,sessions_index.id
  58. ,sessions_index.etag
  59. ,sessions_index.deleted
  60. ,sessions_activegroups.content AS "activegroups.content"
  61. ,sessions_activegroups.updated AS "activegroups.updated"
  62. ,sessions_activegroups.etag AS "activegroups.etag"
  63. ,sessions_activepolicies.content AS "activepolicies.content"
  64. ,sessions_activepolicies.updated AS "activepolicies.updated"
  65. ,sessions_activepolicies.etag AS "activepolicies.etag"
  66. ,sessions_applications.content AS "applications.content"
  67. ,sessions_applications.updated AS "applications.updated"
  68. ,sessions_applications.etag AS "applications.etag"
  69. ,sessions_directive.content AS "directive.content"
  70. ,sessions_directive.updated AS "directive.updated"
  71. ,sessions_directive.etag AS "directive.etag"
  72. ,sessions_properties.content AS "properties.content"
  73. ,sessions_properties.updated AS "properties.updated"
  74. ,sessions_properties.etag AS "properties.etag"
  75. FROM
  76. sessions_activegroups LEFT JOIN sessions_properties
  77. USING (id) LEFT JOIN sessions_index
  78. USING (id) LEFT JOIN sessions_directive
  79. USING (id) LEFT JOIN sessions_applications
  80. USING (id) LEFT JOIN sessions_activepolicies
  81. USING (id) LEFT JOIN sessions
  82. USING (id)
  83. WHERE
  84. sessions_index.deleted IS NOT NULL
  85. AND sessions_index.id IS NOT NULL
  86. AND sessions.id IS NOT NULL
  87. AND sessions_activegroups.etag > : since
  88. UNION
  89. SELECT
  90. sessions.target_id AS "data.target_id"
  91. ,sessions.device_id AS "data.device_id"
  92. ,sessions.nativeSessionName AS "data.nativeSessionName"
  93. ,sessions.terminal AS "data.terminal"
  94. ,sessions.username AS "data.username"
  95. ,sessions.displayName AS "data.displayName"
  96. ,sessions.active AS "data.active"
  97. ,sessions.created AS "data.created"
  98. ,sessions.updated AS "data.updated"
  99. ,sessions.etag AS "data.etag"
  100. ,sessions.online AS "data.online"
  101. ,sessions_index.id
  102. ,sessions_index.etag
  103. ,sessions_index.deleted
  104. ,sessions_activegroups.content AS "activegroups.content"
  105. ,sessions_activegroups.updated AS "activegroups.updated"
  106. ,sessions_activegroups.etag AS "activegroups.etag"
  107. ,sessions_activepolicies.content AS "activepolicies.content"
  108. ,sessions_activepolicies.updated AS "activepolicies.updated"
  109. ,sessions_activepolicies.etag AS "activepolicies.etag"
  110. ,sessions_applications.content AS "applications.content"
  111. ,sessions_applications.updated AS "applications.updated"
  112. ,sessions_applications.etag AS "applications.etag"
  113. ,sessions_directive.content AS "directive.content"
  114. ,sessions_directive.updated AS "directive.updated"
  115. ,sessions_directive.etag AS "directive.etag"
  116. ,sessions_properties.content AS "properties.content"
  117. ,sessions_properties.updated AS "properties.updated"
  118. ,sessions_properties.etag AS "properties.etag"
  119. FROM
  120. sessions_activepolicies LEFT JOIN sessions_properties
  121. USING (id) LEFT JOIN sessions_index
  122. USING (id) LEFT JOIN sessions_directive
  123. USING (id) LEFT JOIN sessions_applications
  124. USING (id) LEFT JOIN sessions_activegroups
  125. USING (id) LEFT JOIN sessions
  126. USING (id)
  127. WHERE
  128. sessions_index.deleted IS NOT NULL
  129. AND sessions_index.id IS NOT NULL
  130. AND sessions.id IS NOT NULL
  131. AND sessions_activepolicies.etag > : since
  132. UNION
  133. SELECT
  134. sessions.target_id AS "data.target_id"
  135. ,sessions.device_id AS "data.device_id"
  136. ,sessions.nativeSessionName AS "data.nativeSessionName"
  137. ,sessions.terminal AS "data.terminal"
  138. ,sessions.username AS "data.username"
  139. ,sessions.displayName AS "data.displayName"
  140. ,sessions.active AS "data.active"
  141. ,sessions.created AS "data.created"
  142. ,sessions.updated AS "data.updated"
  143. ,sessions.etag AS "data.etag"
  144. ,sessions.online AS "data.online"
  145. ,sessions_index.id
  146. ,sessions_index.etag
  147. ,sessions_index.deleted
  148. ,sessions_activegroups.content AS "activegroups.content"
  149. ,sessions_activegroups.updated AS "activegroups.updated"
  150. ,sessions_activegroups.etag AS "activegroups.etag"
  151. ,sessions_activepolicies.content AS "activepolicies.content"
  152. ,sessions_activepolicies.updated AS "activepolicies.updated"
  153. ,sessions_activepolicies.etag AS "activepolicies.etag"
  154. ,sessions_applications.content AS "applications.content"
  155. ,sessions_applications.updated AS "applications.updated"
  156. ,sessions_applications.etag AS "applications.etag"
  157. ,sessions_directive.content AS "directive.content"
  158. ,sessions_directive.updated AS "directive.updated"
  159. ,sessions_directive.etag AS "directive.etag"
  160. ,sessions_properties.content AS "properties.content"
  161. ,sessions_properties.updated AS "properties.updated"
  162. ,sessions_properties.etag AS "properties.etag"
  163. FROM
  164. sessions_applications LEFT JOIN sessions_properties
  165. USING (id) LEFT JOIN sessions_index
  166. USING (id) LEFT JOIN sessions_directive
  167. USING (id) LEFT JOIN sessions_activepolicies
  168. USING (id) LEFT JOIN sessions_activegroups
  169. USING (id) LEFT JOIN sessions
  170. USING (id)
  171. WHERE
  172. sessions_index.deleted IS NOT NULL
  173. AND sessions_index.id IS NOT NULL
  174. AND sessions.id IS NOT NULL
  175. AND sessions_applications.etag > : since
  176. UNION
  177. SELECT
  178. sessions.target_id AS "data.target_id"
  179. ,sessions.device_id AS "data.device_id"
  180. ,sessions.nativeSessionName AS "data.nativeSessionName"
  181. ,sessions.terminal AS "data.terminal"
  182. ,sessions.username AS "data.username"
  183. ,sessions.displayName AS "data.displayName"
  184. ,sessions.active AS "data.active"
  185. ,sessions.created AS "data.created"
  186. ,sessions.updated AS "data.updated"
  187. ,sessions.etag AS "data.etag"
  188. ,sessions.online AS "data.online"
  189. ,sessions_index.id
  190. ,sessions_index.etag
  191. ,sessions_index.deleted
  192. ,sessions_activegroups.content AS "activegroups.content"
  193. ,sessions_activegroups.updated AS "activegroups.updated"
  194. ,sessions_activegroups.etag AS "activegroups.etag"
  195. ,sessions_activepolicies.content AS "activepolicies.content"
  196. ,sessions_activepolicies.updated AS "activepolicies.updated"
  197. ,sessions_activepolicies.etag AS "activepolicies.etag"
  198. ,sessions_applications.content AS "applications.content"
  199. ,sessions_applications.updated AS "applications.updated"
  200. ,sessions_applications.etag AS "applications.etag"
  201. ,sessions_directive.content AS "directive.content"
  202. ,sessions_directive.updated AS "directive.updated"
  203. ,sessions_directive.etag AS "directive.etag"
  204. ,sessions_properties.content AS "properties.content"
  205. ,sessions_properties.updated AS "properties.updated"
  206. ,sessions_properties.etag AS "properties.etag"
  207. FROM
  208. sessions_directive LEFT JOIN sessions_properties
  209. USING (id) LEFT JOIN sessions_index
  210. USING (id) LEFT JOIN sessions_applications
  211. USING (id) LEFT JOIN sessions_activepolicies
  212. USING (id) LEFT JOIN sessions_activegroups
  213. USING (id) LEFT JOIN sessions
  214. USING (id)
  215. WHERE
  216. sessions_index.deleted IS NOT NULL
  217. AND sessions_index.id IS NOT NULL
  218. AND sessions.id IS NOT NULL
  219. AND sessions_directive.etag > : since
  220. UNION
  221. SELECT
  222. NULL
  223. ,NULL
  224. ,NULL
  225. ,NULL
  226. ,NULL
  227. ,NULL
  228. ,NULL
  229. ,NULL
  230. ,NULL
  231. ,NULL
  232. ,NULL
  233. ,sessions_index.id
  234. ,sessions_index.etag
  235. ,sessions_index.deleted
  236. ,NULL
  237. ,NULL
  238. ,NULL
  239. ,NULL
  240. ,NULL
  241. ,NULL
  242. ,NULL
  243. ,NULL
  244. ,NULL
  245. ,NULL
  246. ,NULL
  247. ,NULL
  248. ,NULL
  249. ,NULL
  250. ,NULL
  251. FROM
  252. sessions_index LEFT JOIN sessions_properties
  253. USING (id) LEFT JOIN sessions_directive
  254. USING (id) LEFT JOIN sessions_applications
  255. USING (id) LEFT JOIN sessions_activepolicies
  256. USING (id) LEFT JOIN sessions_activegroups
  257. USING (id) LEFT JOIN sessions
  258. USING (id)
  259. WHERE
  260. sessions_index.deleted IS NOT NULL
  261. AND sessions_index.id IS NOT NULL
  262. AND sessions.id IS NOT NULL
  263. AND sessions_index.etag > : since
  264. UNION
  265. SELECT
  266. sessions.target_id AS "data.target_id"
  267. ,sessions.device_id AS "data.device_id"
  268. ,sessions.nativeSessionName AS "data.nativeSessionName"
  269. ,sessions.terminal AS "data.terminal"
  270. ,sessions.username AS "data.username"
  271. ,sessions.displayName AS "data.displayName"
  272. ,sessions.active AS "data.active"
  273. ,sessions.created AS "data.created"
  274. ,sessions.updated AS "data.updated"
  275. ,sessions.etag AS "data.etag"
  276. ,sessions.online AS "data.online"
  277. ,sessions_index.id
  278. ,sessions_index.etag
  279. ,sessions_index.deleted
  280. ,sessions_activegroups.content AS "activegroups.content"
  281. ,sessions_activegroups.updated AS "activegroups.updated"
  282. ,sessions_activegroups.etag AS "activegroups.etag"
  283. ,sessions_activepolicies.content AS "activepolicies.content"
  284. ,sessions_activepolicies.updated AS "activepolicies.updated"
  285. ,sessions_activepolicies.etag AS "activepolicies.etag"
  286. ,sessions_applications.content AS "applications.content"
  287. ,sessions_applications.updated AS "applications.updated"
  288. ,sessions_applications.etag AS "applications.etag"
  289. ,sessions_directive.content AS "directive.content"
  290. ,sessions_directive.updated AS "directive.updated"
  291. ,sessions_directive.etag AS "directive.etag"
  292. ,sessions_properties.content AS "properties.content"
  293. ,sessions_properties.updated AS "properties.updated"
  294. ,sessions_properties.etag AS "properties.etag"
  295. FROM
  296. sessions_properties LEFT JOIN sessions_index
  297. USING (id) LEFT JOIN sessions_directive
  298. USING (id) LEFT JOIN sessions_applications
  299. USING (id) LEFT JOIN sessions_activepolicies
  300. USING (id) LEFT JOIN sessions_activegroups
  301. USING (id) LEFT JOIN sessions
  302. USING (id)
  303. WHERE
  304. sessions_index.deleted IS NOT NULL
  305. AND sessions_index.id IS NOT NULL
  306. AND sessions.id IS NOT NULL
  307. AND sessions_properties.etag > : since
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement