Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.92 KB | None | 0 0
  1. {SELECT
  2. `Apply1`.`HISTORYID1` AS `HistoryID`,
  3. `Apply1`.`C1`,
  4. `Apply1`.`Version`,
  5. `Apply1`.`LogDate`,
  6. `Apply1`.`IsDeleted`,
  7. `Apply1`.`Name`,
  8. `Apply1`.`Information`,
  9. `Apply1`.`ExpirationDate`,
  10. `Apply1`.`TimesViewed`,
  11. `Apply1`.`IsCompensated`,
  12. `Apply1`.`Price`,
  13. `Apply1`.`IsApproved`,
  14. `Apply1`.`Weight`,
  15. `Apply1`.`VideoURL`,
  16. `Apply1`.`UserGuideURL`,
  17. `Apply1`.`Author_ID`,
  18. `Apply1`.`Dimension_Id`,
  19. `Apply1`.`ProductCategory_Id`,
  20. `Apply1`.`Supplier_ID`
  21. FROM (SELECT
  22. `Distinct1`.`HistoryID`,
  23. (SELECT
  24. `Project2`.`HistoryID`
  25. FROM (SELECT
  26. `Extent2`.`HistoryID`,
  27. `Extent2`.`Version`,
  28. `Extent2`.`LogDate`,
  29. `Extent2`.`IsDeleted`,
  30. `Extent2`.`Author_ID`,
  31. `Extent3`.`Dimension_Id`,
  32. `Extent3`.`ProductCategory_Id`,
  33. `Extent3`.`Supplier_ID`,
  34. `Extent3`.`Name`,
  35. `Extent3`.`Information`,
  36. `Extent3`.`ExpirationDate`,
  37. `Extent3`.`TimesViewed`,
  38. `Extent3`.`IsCompensated`,
  39. `Extent3`.`Price`,
  40. `Extent3`.`IsApproved`,
  41. `Extent3`.`Weight`,
  42. `Extent3`.`VideoURL`,
  43. `Extent3`.`UserGuideURL`,
  44. @gp1 AS `C1`
  45. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  46. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  47. ORDER BY
  48. `Project2`.`Version` DESC LIMIT 1) AS `HISTORYID1`,
  49. (SELECT
  50. `Project2`.`Version`
  51. FROM (SELECT
  52. `Extent2`.`HistoryID`,
  53. `Extent2`.`Version`,
  54. `Extent2`.`LogDate`,
  55. `Extent2`.`IsDeleted`,
  56. `Extent2`.`Author_ID`,
  57. `Extent3`.`Dimension_Id`,
  58. `Extent3`.`ProductCategory_Id`,
  59. `Extent3`.`Supplier_ID`,
  60. `Extent3`.`Name`,
  61. `Extent3`.`Information`,
  62. `Extent3`.`ExpirationDate`,
  63. `Extent3`.`TimesViewed`,
  64. `Extent3`.`IsCompensated`,
  65. `Extent3`.`Price`,
  66. `Extent3`.`IsApproved`,
  67. `Extent3`.`Weight`,
  68. `Extent3`.`VideoURL`,
  69. `Extent3`.`UserGuideURL`,
  70. @gp1 AS `C1`
  71. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  72. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  73. ORDER BY
  74. `Project2`.`Version` DESC LIMIT 1) AS `Version`,
  75. (SELECT
  76. `Project2`.`LogDate`
  77. FROM (SELECT
  78. `Extent2`.`HistoryID`,
  79. `Extent2`.`Version`,
  80. `Extent2`.`LogDate`,
  81. `Extent2`.`IsDeleted`,
  82. `Extent2`.`Author_ID`,
  83. `Extent3`.`Dimension_Id`,
  84. `Extent3`.`ProductCategory_Id`,
  85. `Extent3`.`Supplier_ID`,
  86. `Extent3`.`Name`,
  87. `Extent3`.`Information`,
  88. `Extent3`.`ExpirationDate`,
  89. `Extent3`.`TimesViewed`,
  90. `Extent3`.`IsCompensated`,
  91. `Extent3`.`Price`,
  92. `Extent3`.`IsApproved`,
  93. `Extent3`.`Weight`,
  94. `Extent3`.`VideoURL`,
  95. `Extent3`.`UserGuideURL`,
  96. @gp1 AS `C1`
  97. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  98. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  99. ORDER BY
  100. `Project2`.`Version` DESC LIMIT 1) AS `LogDate`,
  101. (SELECT
  102. `Project2`.`IsDeleted`
  103. FROM (SELECT
  104. `Extent2`.`HistoryID`,
  105. `Extent2`.`Version`,
  106. `Extent2`.`LogDate`,
  107. `Extent2`.`IsDeleted`,
  108. `Extent2`.`Author_ID`,
  109. `Extent3`.`Dimension_Id`,
  110. `Extent3`.`ProductCategory_Id`,
  111. `Extent3`.`Supplier_ID`,
  112. `Extent3`.`Name`,
  113. `Extent3`.`Information`,
  114. `Extent3`.`ExpirationDate`,
  115. `Extent3`.`TimesViewed`,
  116. `Extent3`.`IsCompensated`,
  117. `Extent3`.`Price`,
  118. `Extent3`.`IsApproved`,
  119. `Extent3`.`Weight`,
  120. `Extent3`.`VideoURL`,
  121. `Extent3`.`UserGuideURL`,
  122. @gp1 AS `C1`
  123. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  124. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  125. ORDER BY
  126. `Project2`.`Version` DESC LIMIT 1) AS `IsDeleted`,
  127. (SELECT
  128. `Project2`.`Author_ID`
  129. FROM (SELECT
  130. `Extent2`.`HistoryID`,
  131. `Extent2`.`Version`,
  132. `Extent2`.`LogDate`,
  133. `Extent2`.`IsDeleted`,
  134. `Extent2`.`Author_ID`,
  135. `Extent3`.`Dimension_Id`,
  136. `Extent3`.`ProductCategory_Id`,
  137. `Extent3`.`Supplier_ID`,
  138. `Extent3`.`Name`,
  139. `Extent3`.`Information`,
  140. `Extent3`.`ExpirationDate`,
  141. `Extent3`.`TimesViewed`,
  142. `Extent3`.`IsCompensated`,
  143. `Extent3`.`Price`,
  144. `Extent3`.`IsApproved`,
  145. `Extent3`.`Weight`,
  146. `Extent3`.`VideoURL`,
  147. `Extent3`.`UserGuideURL`,
  148. @gp1 AS `C1`
  149. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  150. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  151. ORDER BY
  152. `Project2`.`Version` DESC LIMIT 1) AS `Author_ID`,
  153. (SELECT
  154. `Project2`.`Dimension_Id`
  155. FROM (SELECT
  156. `Extent2`.`HistoryID`,
  157. `Extent2`.`Version`,
  158. `Extent2`.`LogDate`,
  159. `Extent2`.`IsDeleted`,
  160. `Extent2`.`Author_ID`,
  161. `Extent3`.`Dimension_Id`,
  162. `Extent3`.`ProductCategory_Id`,
  163. `Extent3`.`Supplier_ID`,
  164. `Extent3`.`Name`,
  165. `Extent3`.`Information`,
  166. `Extent3`.`ExpirationDate`,
  167. `Extent3`.`TimesViewed`,
  168. `Extent3`.`IsCompensated`,
  169. `Extent3`.`Price`,
  170. `Extent3`.`IsApproved`,
  171. `Extent3`.`Weight`,
  172. `Extent3`.`VideoURL`,
  173. `Extent3`.`UserGuideURL`,
  174. @gp1 AS `C1`
  175. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  176. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  177. ORDER BY
  178. `Project2`.`Version` DESC LIMIT 1) AS `Dimension_Id`,
  179. (SELECT
  180. `Project2`.`ProductCategory_Id`
  181. FROM (SELECT
  182. `Extent2`.`HistoryID`,
  183. `Extent2`.`Version`,
  184. `Extent2`.`LogDate`,
  185. `Extent2`.`IsDeleted`,
  186. `Extent2`.`Author_ID`,
  187. `Extent3`.`Dimension_Id`,
  188. `Extent3`.`ProductCategory_Id`,
  189. `Extent3`.`Supplier_ID`,
  190. `Extent3`.`Name`,
  191. `Extent3`.`Information`,
  192. `Extent3`.`ExpirationDate`,
  193. `Extent3`.`TimesViewed`,
  194. `Extent3`.`IsCompensated`,
  195. `Extent3`.`Price`,
  196. `Extent3`.`IsApproved`,
  197. `Extent3`.`Weight`,
  198. `Extent3`.`VideoURL`,
  199. `Extent3`.`UserGuideURL`,
  200. @gp1 AS `C1`
  201. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  202. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  203. ORDER BY
  204. `Project2`.`Version` DESC LIMIT 1) AS `ProductCategory_Id`,
  205. (SELECT
  206. `Project2`.`Supplier_ID`
  207. FROM (SELECT
  208. `Extent2`.`HistoryID`,
  209. `Extent2`.`Version`,
  210. `Extent2`.`LogDate`,
  211. `Extent2`.`IsDeleted`,
  212. `Extent2`.`Author_ID`,
  213. `Extent3`.`Dimension_Id`,
  214. `Extent3`.`ProductCategory_Id`,
  215. `Extent3`.`Supplier_ID`,
  216. `Extent3`.`Name`,
  217. `Extent3`.`Information`,
  218. `Extent3`.`ExpirationDate`,
  219. `Extent3`.`TimesViewed`,
  220. `Extent3`.`IsCompensated`,
  221. `Extent3`.`Price`,
  222. `Extent3`.`IsApproved`,
  223. `Extent3`.`Weight`,
  224. `Extent3`.`VideoURL`,
  225. `Extent3`.`UserGuideURL`,
  226. @gp1 AS `C1`
  227. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  228. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  229. ORDER BY
  230. `Project2`.`Version` DESC LIMIT 1) AS `Supplier_ID`,
  231. (SELECT
  232. `Project2`.`Name`
  233. FROM (SELECT
  234. `Extent2`.`HistoryID`,
  235. `Extent2`.`Version`,
  236. `Extent2`.`LogDate`,
  237. `Extent2`.`IsDeleted`,
  238. `Extent2`.`Author_ID`,
  239. `Extent3`.`Dimension_Id`,
  240. `Extent3`.`ProductCategory_Id`,
  241. `Extent3`.`Supplier_ID`,
  242. `Extent3`.`Name`,
  243. `Extent3`.`Information`,
  244. `Extent3`.`ExpirationDate`,
  245. `Extent3`.`TimesViewed`,
  246. `Extent3`.`IsCompensated`,
  247. `Extent3`.`Price`,
  248. `Extent3`.`IsApproved`,
  249. `Extent3`.`Weight`,
  250. `Extent3`.`VideoURL`,
  251. `Extent3`.`UserGuideURL`,
  252. @gp1 AS `C1`
  253. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  254. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  255. ORDER BY
  256. `Project2`.`Version` DESC LIMIT 1) AS `Name`,
  257. (SELECT
  258. `Project2`.`Information`
  259. FROM (SELECT
  260. `Extent2`.`HistoryID`,
  261. `Extent2`.`Version`,
  262. `Extent2`.`LogDate`,
  263. `Extent2`.`IsDeleted`,
  264. `Extent2`.`Author_ID`,
  265. `Extent3`.`Dimension_Id`,
  266. `Extent3`.`ProductCategory_Id`,
  267. `Extent3`.`Supplier_ID`,
  268. `Extent3`.`Name`,
  269. `Extent3`.`Information`,
  270. `Extent3`.`ExpirationDate`,
  271. `Extent3`.`TimesViewed`,
  272. `Extent3`.`IsCompensated`,
  273. `Extent3`.`Price`,
  274. `Extent3`.`IsApproved`,
  275. `Extent3`.`Weight`,
  276. `Extent3`.`VideoURL`,
  277. `Extent3`.`UserGuideURL`,
  278. @gp1 AS `C1`
  279. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  280. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  281. ORDER BY
  282. `Project2`.`Version` DESC LIMIT 1) AS `Information`,
  283. (SELECT
  284. `Project2`.`ExpirationDate`
  285. FROM (SELECT
  286. `Extent2`.`HistoryID`,
  287. `Extent2`.`Version`,
  288. `Extent2`.`LogDate`,
  289. `Extent2`.`IsDeleted`,
  290. `Extent2`.`Author_ID`,
  291. `Extent3`.`Dimension_Id`,
  292. `Extent3`.`ProductCategory_Id`,
  293. `Extent3`.`Supplier_ID`,
  294. `Extent3`.`Name`,
  295. `Extent3`.`Information`,
  296. `Extent3`.`ExpirationDate`,
  297. `Extent3`.`TimesViewed`,
  298. `Extent3`.`IsCompensated`,
  299. `Extent3`.`Price`,
  300. `Extent3`.`IsApproved`,
  301. `Extent3`.`Weight`,
  302. `Extent3`.`VideoURL`,
  303. `Extent3`.`UserGuideURL`,
  304. @gp1 AS `C1`
  305. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  306. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  307. ORDER BY
  308. `Project2`.`Version` DESC LIMIT 1) AS `ExpirationDate`,
  309. (SELECT
  310. `Project2`.`TimesViewed`
  311. FROM (SELECT
  312. `Extent2`.`HistoryID`,
  313. `Extent2`.`Version`,
  314. `Extent2`.`LogDate`,
  315. `Extent2`.`IsDeleted`,
  316. `Extent2`.`Author_ID`,
  317. `Extent3`.`Dimension_Id`,
  318. `Extent3`.`ProductCategory_Id`,
  319. `Extent3`.`Supplier_ID`,
  320. `Extent3`.`Name`,
  321. `Extent3`.`Information`,
  322. `Extent3`.`ExpirationDate`,
  323. `Extent3`.`TimesViewed`,
  324. `Extent3`.`IsCompensated`,
  325. `Extent3`.`Price`,
  326. `Extent3`.`IsApproved`,
  327. `Extent3`.`Weight`,
  328. `Extent3`.`VideoURL`,
  329. `Extent3`.`UserGuideURL`,
  330. @gp1 AS `C1`
  331. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  332. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  333. ORDER BY
  334. `Project2`.`Version` DESC LIMIT 1) AS `TimesViewed`,
  335. (SELECT
  336. `Project2`.`IsCompensated`
  337. FROM (SELECT
  338. `Extent2`.`HistoryID`,
  339. `Extent2`.`Version`,
  340. `Extent2`.`LogDate`,
  341. `Extent2`.`IsDeleted`,
  342. `Extent2`.`Author_ID`,
  343. `Extent3`.`Dimension_Id`,
  344. `Extent3`.`ProductCategory_Id`,
  345. `Extent3`.`Supplier_ID`,
  346. `Extent3`.`Name`,
  347. `Extent3`.`Information`,
  348. `Extent3`.`ExpirationDate`,
  349. `Extent3`.`TimesViewed`,
  350. `Extent3`.`IsCompensated`,
  351. `Extent3`.`Price`,
  352. `Extent3`.`IsApproved`,
  353. `Extent3`.`Weight`,
  354. `Extent3`.`VideoURL`,
  355. `Extent3`.`UserGuideURL`,
  356. @gp1 AS `C1`
  357. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  358. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  359. ORDER BY
  360. `Project2`.`Version` DESC LIMIT 1) AS `IsCompensated`,
  361. (SELECT
  362. `Project2`.`Price`
  363. FROM (SELECT
  364. `Extent2`.`HistoryID`,
  365. `Extent2`.`Version`,
  366. `Extent2`.`LogDate`,
  367. `Extent2`.`IsDeleted`,
  368. `Extent2`.`Author_ID`,
  369. `Extent3`.`Dimension_Id`,
  370. `Extent3`.`ProductCategory_Id`,
  371. `Extent3`.`Supplier_ID`,
  372. `Extent3`.`Name`,
  373. `Extent3`.`Information`,
  374. `Extent3`.`ExpirationDate`,
  375. `Extent3`.`TimesViewed`,
  376. `Extent3`.`IsCompensated`,
  377. `Extent3`.`Price`,
  378. `Extent3`.`IsApproved`,
  379. `Extent3`.`Weight`,
  380. `Extent3`.`VideoURL`,
  381. `Extent3`.`UserGuideURL`,
  382. @gp1 AS `C1`
  383. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  384. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  385. ORDER BY
  386. `Project2`.`Version` DESC LIMIT 1) AS `Price`,
  387. (SELECT
  388. `Project2`.`IsApproved`
  389. FROM (SELECT
  390. `Extent2`.`HistoryID`,
  391. `Extent2`.`Version`,
  392. `Extent2`.`LogDate`,
  393. `Extent2`.`IsDeleted`,
  394. `Extent2`.`Author_ID`,
  395. `Extent3`.`Dimension_Id`,
  396. `Extent3`.`ProductCategory_Id`,
  397. `Extent3`.`Supplier_ID`,
  398. `Extent3`.`Name`,
  399. `Extent3`.`Information`,
  400. `Extent3`.`ExpirationDate`,
  401. `Extent3`.`TimesViewed`,
  402. `Extent3`.`IsCompensated`,
  403. `Extent3`.`Price`,
  404. `Extent3`.`IsApproved`,
  405. `Extent3`.`Weight`,
  406. `Extent3`.`VideoURL`,
  407. `Extent3`.`UserGuideURL`,
  408. @gp1 AS `C1`
  409. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  410. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  411. ORDER BY
  412. `Project2`.`Version` DESC LIMIT 1) AS `IsApproved`,
  413. (SELECT
  414. `Project2`.`Weight`
  415. FROM (SELECT
  416. `Extent2`.`HistoryID`,
  417. `Extent2`.`Version`,
  418. `Extent2`.`LogDate`,
  419. `Extent2`.`IsDeleted`,
  420. `Extent2`.`Author_ID`,
  421. `Extent3`.`Dimension_Id`,
  422. `Extent3`.`ProductCategory_Id`,
  423. `Extent3`.`Supplier_ID`,
  424. `Extent3`.`Name`,
  425. `Extent3`.`Information`,
  426. `Extent3`.`ExpirationDate`,
  427. `Extent3`.`TimesViewed`,
  428. `Extent3`.`IsCompensated`,
  429. `Extent3`.`Price`,
  430. `Extent3`.`IsApproved`,
  431. `Extent3`.`Weight`,
  432. `Extent3`.`VideoURL`,
  433. `Extent3`.`UserGuideURL`,
  434. @gp1 AS `C1`
  435. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  436. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  437. ORDER BY
  438. `Project2`.`Version` DESC LIMIT 1) AS `Weight`,
  439. (SELECT
  440. `Project2`.`VideoURL`
  441. FROM (SELECT
  442. `Extent2`.`HistoryID`,
  443. `Extent2`.`Version`,
  444. `Extent2`.`LogDate`,
  445. `Extent2`.`IsDeleted`,
  446. `Extent2`.`Author_ID`,
  447. `Extent3`.`Dimension_Id`,
  448. `Extent3`.`ProductCategory_Id`,
  449. `Extent3`.`Supplier_ID`,
  450. `Extent3`.`Name`,
  451. `Extent3`.`Information`,
  452. `Extent3`.`ExpirationDate`,
  453. `Extent3`.`TimesViewed`,
  454. `Extent3`.`IsCompensated`,
  455. `Extent3`.`Price`,
  456. `Extent3`.`IsApproved`,
  457. `Extent3`.`Weight`,
  458. `Extent3`.`VideoURL`,
  459. `Extent3`.`UserGuideURL`,
  460. @gp1 AS `C1`
  461. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  462. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  463. ORDER BY
  464. `Project2`.`Version` DESC LIMIT 1) AS `VideoURL`,
  465. (SELECT
  466. `Project2`.`UserGuideURL`
  467. FROM (SELECT
  468. `Extent2`.`HistoryID`,
  469. `Extent2`.`Version`,
  470. `Extent2`.`LogDate`,
  471. `Extent2`.`IsDeleted`,
  472. `Extent2`.`Author_ID`,
  473. `Extent3`.`Dimension_Id`,
  474. `Extent3`.`ProductCategory_Id`,
  475. `Extent3`.`Supplier_ID`,
  476. `Extent3`.`Name`,
  477. `Extent3`.`Information`,
  478. `Extent3`.`ExpirationDate`,
  479. `Extent3`.`TimesViewed`,
  480. `Extent3`.`IsCompensated`,
  481. `Extent3`.`Price`,
  482. `Extent3`.`IsApproved`,
  483. `Extent3`.`Weight`,
  484. `Extent3`.`VideoURL`,
  485. `Extent3`.`UserGuideURL`,
  486. @gp1 AS `C1`
  487. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  488. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  489. ORDER BY
  490. `Project2`.`Version` DESC LIMIT 1) AS `UserGuideURL`,
  491. (SELECT
  492. `Project2`.`C1`
  493. FROM (SELECT
  494. `Extent2`.`HistoryID`,
  495. `Extent2`.`Version`,
  496. `Extent2`.`LogDate`,
  497. `Extent2`.`IsDeleted`,
  498. `Extent2`.`Author_ID`,
  499. `Extent3`.`Dimension_Id`,
  500. `Extent3`.`ProductCategory_Id`,
  501. `Extent3`.`Supplier_ID`,
  502. `Extent3`.`Name`,
  503. `Extent3`.`Information`,
  504. `Extent3`.`ExpirationDate`,
  505. `Extent3`.`TimesViewed`,
  506. `Extent3`.`IsCompensated`,
  507. `Extent3`.`Price`,
  508. `Extent3`.`IsApproved`,
  509. `Extent3`.`Weight`,
  510. `Extent3`.`VideoURL`,
  511. `Extent3`.`UserGuideURL`,
  512. @gp1 AS `C1`
  513. FROM `Histories` AS `Extent2` INNER JOIN `Products` AS `Extent3` ON (`Extent2`.`HistoryID` = `Extent3`.`HistoryID`) AND (`Extent2`.`Version` = `Extent3`.`Version`)
  514. WHERE `Extent1`.`HistoryID` = `Extent2`.`HistoryID`) AS `Project2`
  515. ORDER BY
  516. `Project2`.`Version` DESC LIMIT 1) AS `C1`
  517. FROM (SELECT DISTINCT
  518. `Extent1`.`HistoryID`
  519. FROM `Products` AS `Extent1`) AS `Distinct1`) AS `Apply1`}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement