@gooddata/sdk-maql-language-server 0.0.0-stage → 11.65.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +118 -2
  3. package/esm/completions/complete.d.ts +12 -0
  4. package/esm/completions/complete.d.ts.map +1 -0
  5. package/esm/completions/complete.js +316 -0
  6. package/esm/completions/descriptions.d.ts +42 -0
  7. package/esm/completions/descriptions.d.ts.map +1 -0
  8. package/esm/completions/descriptions.js +290 -0
  9. package/esm/completions/findContext.d.ts +19 -0
  10. package/esm/completions/findContext.d.ts.map +1 -0
  11. package/esm/completions/findContext.js +172 -0
  12. package/esm/completions/functionDescriptions.d.ts +3 -0
  13. package/esm/completions/functionDescriptions.d.ts.map +1 -0
  14. package/esm/completions/functionDescriptions.js +99 -0
  15. package/esm/completions/sort.d.ts +4 -0
  16. package/esm/completions/sort.d.ts.map +1 -0
  17. package/esm/completions/sort.js +88 -0
  18. package/esm/constants.d.ts +21 -0
  19. package/esm/constants.d.ts.map +1 -0
  20. package/esm/constants.js +22 -0
  21. package/esm/dateElementFormat.d.ts +9 -0
  22. package/esm/dateElementFormat.d.ts.map +1 -0
  23. package/esm/dateElementFormat.js +60 -0
  24. package/esm/decorations.d.ts +39 -0
  25. package/esm/decorations.d.ts.map +1 -0
  26. package/esm/decorations.js +42 -0
  27. package/esm/diagnostics.d.ts +12 -0
  28. package/esm/diagnostics.d.ts.map +1 -0
  29. package/esm/diagnostics.js +260 -0
  30. package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.d.ts +2 -0
  31. package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.d.ts.map +1 -0
  32. package/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.js +61 -0
  33. package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.d.ts +2 -0
  34. package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.d.ts.map +1 -0
  35. package/esm/docs/en/docs/create-metrics/maql/aggregation/avg.js +19 -0
  36. package/esm/docs/en/docs/create-metrics/maql/aggregation/count.d.ts +2 -0
  37. package/esm/docs/en/docs/create-metrics/maql/aggregation/count.d.ts.map +1 -0
  38. package/esm/docs/en/docs/create-metrics/maql/aggregation/count.js +72 -0
  39. package/esm/docs/en/docs/create-metrics/maql/aggregation/first.d.ts +2 -0
  40. package/esm/docs/en/docs/create-metrics/maql/aggregation/first.d.ts.map +1 -0
  41. package/esm/docs/en/docs/create-metrics/maql/aggregation/first.js +41 -0
  42. package/esm/docs/en/docs/create-metrics/maql/aggregation/last.d.ts +2 -0
  43. package/esm/docs/en/docs/create-metrics/maql/aggregation/last.d.ts.map +1 -0
  44. package/esm/docs/en/docs/create-metrics/maql/aggregation/last.js +69 -0
  45. package/esm/docs/en/docs/create-metrics/maql/aggregation/max.d.ts +2 -0
  46. package/esm/docs/en/docs/create-metrics/maql/aggregation/max.d.ts.map +1 -0
  47. package/esm/docs/en/docs/create-metrics/maql/aggregation/max.js +61 -0
  48. package/esm/docs/en/docs/create-metrics/maql/aggregation/median.d.ts +2 -0
  49. package/esm/docs/en/docs/create-metrics/maql/aggregation/median.d.ts.map +1 -0
  50. package/esm/docs/en/docs/create-metrics/maql/aggregation/median.js +25 -0
  51. package/esm/docs/en/docs/create-metrics/maql/aggregation/min.d.ts +2 -0
  52. package/esm/docs/en/docs/create-metrics/maql/aggregation/min.d.ts.map +1 -0
  53. package/esm/docs/en/docs/create-metrics/maql/aggregation/min.js +63 -0
  54. package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.d.ts +2 -0
  55. package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.d.ts.map +1 -0
  56. package/esm/docs/en/docs/create-metrics/maql/aggregation/sum.js +20 -0
  57. package/esm/docs/en/docs/create-metrics/maql/conditionals/case.d.ts +2 -0
  58. package/esm/docs/en/docs/create-metrics/maql/conditionals/case.d.ts.map +1 -0
  59. package/esm/docs/en/docs/create-metrics/maql/conditionals/case.js +73 -0
  60. package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.d.ts +2 -0
  61. package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.d.ts.map +1 -0
  62. package/esm/docs/en/docs/create-metrics/maql/conditionals/if-then-else.js +29 -0
  63. package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.d.ts +2 -0
  64. package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.d.ts.map +1 -0
  65. package/esm/docs/en/docs/create-metrics/maql/conditionals/ifnull.js +96 -0
  66. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.d.ts +2 -0
  67. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.d.ts.map +1 -0
  68. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-ranking-filters.js +71 -0
  69. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.d.ts +2 -0
  70. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.d.ts.map +1 -0
  71. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-having-clause.js +65 -0
  72. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.d.ts +2 -0
  73. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.d.ts.map +1 -0
  74. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-like-clause.js +36 -0
  75. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.d.ts +2 -0
  76. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.d.ts.map +1 -0
  77. package/esm/docs/en/docs/create-metrics/maql/filters/filtering-with-the-where-clause.js +36 -0
  78. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.d.ts +2 -0
  79. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.d.ts.map +1 -0
  80. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions-except-for-attribute.js +21 -0
  81. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.d.ts +2 -0
  82. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.d.ts.map +1 -0
  83. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all-in-all-other-dimensions.js +27 -0
  84. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.d.ts +2 -0
  85. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.d.ts.map +1 -0
  86. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-all.js +64 -0
  87. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.d.ts +2 -0
  88. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.d.ts.map +1 -0
  89. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by-attribute-all-in-all-other-dimensions.js +22 -0
  90. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.d.ts +2 -0
  91. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.d.ts.map +1 -0
  92. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-attribute-filters/by.js +85 -0
  93. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.d.ts +2 -0
  94. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.d.ts.map +1 -0
  95. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-except.js +37 -0
  96. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.d.ts +2 -0
  97. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.d.ts.map +1 -0
  98. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/with-parent-filter.js +42 -0
  99. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.d.ts +2 -0
  100. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.d.ts.map +1 -0
  101. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-except.js +94 -0
  102. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.d.ts +2 -0
  103. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.d.ts.map +1 -0
  104. package/esm/docs/en/docs/create-metrics/maql/filters/overriding-parent/without-parent-filter.js +33 -0
  105. package/esm/docs/en/docs/create-metrics/maql/for-each.d.ts +2 -0
  106. package/esm/docs/en/docs/create-metrics/maql/for-each.d.ts.map +1 -0
  107. package/esm/docs/en/docs/create-metrics/maql/for-each.js +17 -0
  108. package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.d.ts +2 -0
  109. package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.d.ts.map +1 -0
  110. package/esm/docs/en/docs/create-metrics/maql/logical-operators/and.js +37 -0
  111. package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.d.ts +2 -0
  112. package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.d.ts.map +1 -0
  113. package/esm/docs/en/docs/create-metrics/maql/logical-operators/not.js +12 -0
  114. package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.d.ts +2 -0
  115. package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.d.ts.map +1 -0
  116. package/esm/docs/en/docs/create-metrics/maql/logical-operators/or.js +22 -0
  117. package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.d.ts +2 -0
  118. package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.d.ts.map +1 -0
  119. package/esm/docs/en/docs/create-metrics/maql/maql-and-multidimensionality.js +59 -0
  120. package/esm/docs/en/docs/create-metrics/maql/math/abs.d.ts +2 -0
  121. package/esm/docs/en/docs/create-metrics/maql/math/abs.d.ts.map +1 -0
  122. package/esm/docs/en/docs/create-metrics/maql/math/abs.js +23 -0
  123. package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.d.ts +2 -0
  124. package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.d.ts.map +1 -0
  125. package/esm/docs/en/docs/create-metrics/maql/math/arithmetic-operations.js +29 -0
  126. package/esm/docs/en/docs/create-metrics/maql/math/ceiling.d.ts +2 -0
  127. package/esm/docs/en/docs/create-metrics/maql/math/ceiling.d.ts.map +1 -0
  128. package/esm/docs/en/docs/create-metrics/maql/math/ceiling.js +21 -0
  129. package/esm/docs/en/docs/create-metrics/maql/math/exp.d.ts +2 -0
  130. package/esm/docs/en/docs/create-metrics/maql/math/exp.d.ts.map +1 -0
  131. package/esm/docs/en/docs/create-metrics/maql/math/exp.js +27 -0
  132. package/esm/docs/en/docs/create-metrics/maql/math/floor.d.ts +2 -0
  133. package/esm/docs/en/docs/create-metrics/maql/math/floor.d.ts.map +1 -0
  134. package/esm/docs/en/docs/create-metrics/maql/math/floor.js +21 -0
  135. package/esm/docs/en/docs/create-metrics/maql/math/greatest.d.ts +2 -0
  136. package/esm/docs/en/docs/create-metrics/maql/math/greatest.d.ts.map +1 -0
  137. package/esm/docs/en/docs/create-metrics/maql/math/greatest.js +13 -0
  138. package/esm/docs/en/docs/create-metrics/maql/math/least.d.ts +2 -0
  139. package/esm/docs/en/docs/create-metrics/maql/math/least.d.ts.map +1 -0
  140. package/esm/docs/en/docs/create-metrics/maql/math/least.js +13 -0
  141. package/esm/docs/en/docs/create-metrics/maql/math/ln.d.ts +2 -0
  142. package/esm/docs/en/docs/create-metrics/maql/math/ln.d.ts.map +1 -0
  143. package/esm/docs/en/docs/create-metrics/maql/math/ln.js +33 -0
  144. package/esm/docs/en/docs/create-metrics/maql/math/log.d.ts +2 -0
  145. package/esm/docs/en/docs/create-metrics/maql/math/log.d.ts.map +1 -0
  146. package/esm/docs/en/docs/create-metrics/maql/math/log.js +29 -0
  147. package/esm/docs/en/docs/create-metrics/maql/math/power.d.ts +2 -0
  148. package/esm/docs/en/docs/create-metrics/maql/math/power.d.ts.map +1 -0
  149. package/esm/docs/en/docs/create-metrics/maql/math/power.js +33 -0
  150. package/esm/docs/en/docs/create-metrics/maql/math/round.d.ts +2 -0
  151. package/esm/docs/en/docs/create-metrics/maql/math/round.d.ts.map +1 -0
  152. package/esm/docs/en/docs/create-metrics/maql/math/round.js +34 -0
  153. package/esm/docs/en/docs/create-metrics/maql/math/sign.d.ts +2 -0
  154. package/esm/docs/en/docs/create-metrics/maql/math/sign.d.ts.map +1 -0
  155. package/esm/docs/en/docs/create-metrics/maql/math/sign.js +30 -0
  156. package/esm/docs/en/docs/create-metrics/maql/math/sqrt.d.ts +2 -0
  157. package/esm/docs/en/docs/create-metrics/maql/math/sqrt.d.ts.map +1 -0
  158. package/esm/docs/en/docs/create-metrics/maql/math/sqrt.js +32 -0
  159. package/esm/docs/en/docs/create-metrics/maql/math/trunc.d.ts +2 -0
  160. package/esm/docs/en/docs/create-metrics/maql/math/trunc.d.ts.map +1 -0
  161. package/esm/docs/en/docs/create-metrics/maql/math/trunc.js +36 -0
  162. package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.d.ts +2 -0
  163. package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.d.ts.map +1 -0
  164. package/esm/docs/en/docs/create-metrics/maql/ranking/percentile.js +57 -0
  165. package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.d.ts +2 -0
  166. package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.d.ts.map +1 -0
  167. package/esm/docs/en/docs/create-metrics/maql/ranking/rank-variations.js +90 -0
  168. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.d.ts +2 -0
  169. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.d.ts.map +1 -0
  170. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.js +53 -0
  171. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.d.ts +2 -0
  172. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.d.ts.map +1 -0
  173. package/esm/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.js +29 -0
  174. package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.d.ts +2 -0
  175. package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.d.ts.map +1 -0
  176. package/esm/docs/en/docs/create-metrics/maql/ranking/within-clause.js +101 -0
  177. package/esm/docs/en/docs/create-metrics/maql/relational-operators.d.ts +2 -0
  178. package/esm/docs/en/docs/create-metrics/maql/relational-operators.d.ts.map +1 -0
  179. package/esm/docs/en/docs/create-metrics/maql/relational-operators.js +50 -0
  180. package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.d.ts +2 -0
  181. package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.d.ts.map +1 -0
  182. package/esm/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.js +71 -0
  183. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.d.ts +2 -0
  184. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.d.ts.map +1 -0
  185. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.js +54 -0
  186. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.d.ts +2 -0
  187. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.d.ts.map +1 -0
  188. package/esm/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.js +37 -0
  189. package/esm/docs/en/docs/create-metrics/maql/statistic/correl.d.ts +2 -0
  190. package/esm/docs/en/docs/create-metrics/maql/statistic/correl.d.ts.map +1 -0
  191. package/esm/docs/en/docs/create-metrics/maql/statistic/correl.js +47 -0
  192. package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.d.ts +2 -0
  193. package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.d.ts.map +1 -0
  194. package/esm/docs/en/docs/create-metrics/maql/statistic/covariance-functions.js +46 -0
  195. package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.d.ts +2 -0
  196. package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.d.ts.map +1 -0
  197. package/esm/docs/en/docs/create-metrics/maql/statistic/forecast.js +74 -0
  198. package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.d.ts +2 -0
  199. package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.d.ts.map +1 -0
  200. package/esm/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.js +44 -0
  201. package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.d.ts +2 -0
  202. package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.d.ts.map +1 -0
  203. package/esm/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.js +88 -0
  204. package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.d.ts +2 -0
  205. package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.d.ts.map +1 -0
  206. package/esm/docs/en/docs/create-metrics/maql/statistic/variance-functions.js +54 -0
  207. package/esm/docs/en/docs/create-metrics/maql/time/for-each.d.ts +2 -0
  208. package/esm/docs/en/docs/create-metrics/maql/time/for-each.d.ts.map +1 -0
  209. package/esm/docs/en/docs/create-metrics/maql/time/for-each.js +96 -0
  210. package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.d.ts +2 -0
  211. package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.d.ts.map +1 -0
  212. package/esm/docs/en/docs/create-metrics/maql/time/for-next-period.js +38 -0
  213. package/esm/docs/en/docs/create-metrics/maql/time/for-next.d.ts +2 -0
  214. package/esm/docs/en/docs/create-metrics/maql/time/for-next.d.ts.map +1 -0
  215. package/esm/docs/en/docs/create-metrics/maql/time/for-next.js +27 -0
  216. package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.d.ts +2 -0
  217. package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.d.ts.map +1 -0
  218. package/esm/docs/en/docs/create-metrics/maql/time/for-previous-period.js +26 -0
  219. package/esm/docs/en/docs/create-metrics/maql/time/for-previous.d.ts +2 -0
  220. package/esm/docs/en/docs/create-metrics/maql/time/for-previous.d.ts.map +1 -0
  221. package/esm/docs/en/docs/create-metrics/maql/time/for-previous.js +30 -0
  222. package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.d.ts +2 -0
  223. package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.d.ts.map +1 -0
  224. package/esm/docs/en/docs/create-metrics/maql/time/functions-for-referring-to-past-time-periods.js +36 -0
  225. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.d.ts +2 -0
  226. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.d.ts.map +1 -0
  227. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-add.js +53 -0
  228. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.d.ts +2 -0
  229. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.d.ts.map +1 -0
  230. package/esm/docs/en/docs/create-metrics/maql/time-arithmetics/datetime-diff.js +55 -0
  231. package/esm/docs/en/docs/create-metrics/maql/time-macros.d.ts +2 -0
  232. package/esm/docs/en/docs/create-metrics/maql/time-macros.d.ts.map +1 -0
  233. package/esm/docs/en/docs/create-metrics/maql/time-macros.js +79 -0
  234. package/esm/docs/index.d.ts +77 -0
  235. package/esm/docs/index.d.ts.map +1 -0
  236. package/esm/docs/index.js +141 -0
  237. package/esm/findObjects.d.ts +13 -0
  238. package/esm/findObjects.d.ts.map +1 -0
  239. package/esm/findObjects.js +72 -0
  240. package/esm/format.d.ts +4 -0
  241. package/esm/format.d.ts.map +1 -0
  242. package/esm/format.js +581 -0
  243. package/esm/highlight/convert.d.ts +3 -0
  244. package/esm/highlight/convert.d.ts.map +1 -0
  245. package/esm/highlight/convert.js +12 -0
  246. package/esm/highlight/semanticsHighlight.d.ts +29 -0
  247. package/esm/highlight/semanticsHighlight.d.ts.map +1 -0
  248. package/esm/highlight/semanticsHighlight.js +326 -0
  249. package/esm/highlight/utils.d.ts +3 -0
  250. package/esm/highlight/utils.d.ts.map +1 -0
  251. package/esm/highlight/utils.js +14 -0
  252. package/esm/hover.d.ts +17 -0
  253. package/esm/hover.d.ts.map +1 -0
  254. package/esm/hover.js +60 -0
  255. package/esm/index.d.ts +9 -0
  256. package/esm/index.d.ts.map +1 -0
  257. package/esm/index.js +7 -0
  258. package/esm/labelElements.d.ts +22 -0
  259. package/esm/labelElements.d.ts.map +1 -0
  260. package/esm/labelElements.js +225 -0
  261. package/esm/maqlLanguageService.d.ts +51 -0
  262. package/esm/maqlLanguageService.d.ts.map +1 -0
  263. package/esm/maqlLanguageService.js +102 -0
  264. package/esm/maqlObjectTypes.d.ts +15 -0
  265. package/esm/maqlObjectTypes.d.ts.map +1 -0
  266. package/esm/maqlObjectTypes.js +28 -0
  267. package/esm/maqlServer.d.ts +4 -0
  268. package/esm/maqlServer.d.ts.map +1 -0
  269. package/esm/maqlServer.js +78 -0
  270. package/esm/metadata/model.d.ts +116 -0
  271. package/esm/metadata/model.d.ts.map +1 -0
  272. package/esm/metadata/model.js +137 -0
  273. package/esm/metadata/parameters.d.ts +16 -0
  274. package/esm/metadata/parameters.d.ts.map +1 -0
  275. package/esm/metadata/parameters.js +38 -0
  276. package/esm/metadata/types.d.ts +14 -0
  277. package/esm/metadata/types.d.ts.map +1 -0
  278. package/esm/metadata/types.js +2 -0
  279. package/esm/metadataService.d.ts +50 -0
  280. package/esm/metadataService.d.ts.map +1 -0
  281. package/esm/metadataService.js +156 -0
  282. package/esm/node/main.d.ts +2 -0
  283. package/esm/node/main.d.ts.map +1 -0
  284. package/esm/node/main.js +18 -0
  285. package/esm/parameterConstraints.d.ts +5 -0
  286. package/esm/parameterConstraints.d.ts.map +1 -0
  287. package/esm/parameterConstraints.js +198 -0
  288. package/esm/parseMaql.d.ts +43 -0
  289. package/esm/parseMaql.d.ts.map +1 -0
  290. package/esm/parseMaql.js +97 -0
  291. package/esm/renderParameters.d.ts +33 -0
  292. package/esm/renderParameters.d.ts.map +1 -0
  293. package/esm/renderParameters.js +72 -0
  294. package/esm/tests/metadata.test.helpers.d.ts +8 -0
  295. package/esm/tests/metadata.test.helpers.d.ts.map +1 -0
  296. package/esm/tests/metadata.test.helpers.js +468 -0
  297. package/esm/tokenRanges.d.ts +36 -0
  298. package/esm/tokenRanges.d.ts.map +1 -0
  299. package/esm/tokenRanges.js +54 -0
  300. package/esm/types/hierarchy.d.ts +37 -0
  301. package/esm/types/hierarchy.d.ts.map +1 -0
  302. package/esm/types/hierarchy.js +165 -0
  303. package/esm/types/signatures.d.ts +40 -0
  304. package/esm/types/signatures.d.ts.map +1 -0
  305. package/esm/types/signatures.js +142 -0
  306. package/esm/types/typeChecking.d.ts +56 -0
  307. package/esm/types/typeChecking.d.ts.map +1 -0
  308. package/esm/types/typeChecking.js +296 -0
  309. package/esm/types/typeModel.d.ts +18 -0
  310. package/esm/types/typeModel.d.ts.map +1 -0
  311. package/esm/types/typeModel.js +84 -0
  312. package/package.json +89 -3
@@ -0,0 +1,13 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# GREATEST
3
+ The GREATEST function identifies the highest value from a selection of
4
+ facts or metrics within one row.
5
+
6
+ ## Syntax
7
+
8
+ \`\`\`
9
+ SELECT GREATEST(…, …, …)
10
+ SELECT GREATEST(fact, fact)
11
+ SELECT GREATEST(metric, metric)
12
+ SELECT GREATEST(fact, metric, metric, fact)
13
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# LEAST\nThe LEAST function identifies the lowest value from a selection of facts\nor metrics within one row.\n\n## Syntax\n\n```\nSELECT LEAST(\u2026, \u2026, \u2026)\nSELECT LEAST(fact, fact)\nSELECT LEAST(metric, metric)\nSELECT LEAST(fact, metric, metric, fact)\n```";
2
+ //# sourceMappingURL=least.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"least.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/least.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,mRAWb,CAAC"}
@@ -0,0 +1,13 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# LEAST
3
+ The LEAST function identifies the lowest value from a selection of facts
4
+ or metrics within one row.
5
+
6
+ ## Syntax
7
+
8
+ \`\`\`
9
+ SELECT LEAST(…, …, …)
10
+ SELECT LEAST(fact, fact)
11
+ SELECT LEAST(metric, metric)
12
+ SELECT LEAST(fact, metric, metric, fact)
13
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# LN\nThe LN function returns the natural logarithm of a number with base e,\nthe constant equal to 2.71828182845904. The LN function returns NULL if\nnumber is less than or equal to 0.\n\nThe LN function has the following format:\n\n```\nLN(n)\n```\n\n- where *n* is greater than 0\n\nA natural logarithm LN(n) is the inverse of the EXP( ) function and\ntakes as arguments any numeric data, including metrics, metrics\nexpressions, and constants.\n\n## Syntax\n\n```\n SELECT LN(\u2026)\nSELECT LN(number)\n```\n\n## Examples\n\n```\nSELECT LN(10)\nSELECT LN(1/12)\nSELECT LN(1.5)\nSELECT LN(SUM({fact/amount}))\n```";
2
+ //# sourceMappingURL=ln.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ln.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/ln.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,gnBA+Bb,CAAC"}
@@ -0,0 +1,33 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# LN
3
+ The LN function returns the natural logarithm of a number with base e,
4
+ the constant equal to 2.71828182845904. The LN function returns NULL if
5
+ number is less than or equal to 0.
6
+
7
+ The LN function has the following format:
8
+
9
+ \`\`\`
10
+ LN(n)
11
+ \`\`\`
12
+
13
+ - where *n* is greater than 0
14
+
15
+ A natural logarithm LN(n) is the inverse of the EXP( ) function and
16
+ takes as arguments any numeric data, including metrics, metrics
17
+ expressions, and constants.
18
+
19
+ ## Syntax
20
+
21
+ \`\`\`
22
+ SELECT LN(…)
23
+ SELECT LN(number)
24
+ \`\`\`
25
+
26
+ ## Examples
27
+
28
+ \`\`\`
29
+ SELECT LN(10)
30
+ SELECT LN(1/12)
31
+ SELECT LN(1.5)
32
+ SELECT LN(SUM({fact/amount}))
33
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# LOG\nThe LOG function returns the logarithm of a number for the given base\nspecified in second parameter of the LOG function. If the base value is\nomitted, base 10 is used.\n\nThe LOG function has the following format:\n\n```\nLOG(n,b)\n```\n\n- *n* is any positive value\n- *b* is base, *b* is any positive value other than 0 or 1\n\n## Syntax\n\n```\nSELECT LOG(\u2026) \nSELECT SQRT(number, base)\n```\n\n## Examples\n\n```\nSELECT LOG(10, 1/12)\nSELECT LOG(SUM({fact/amount}), 2)\nSELECT LOG({metric/amount_max} * 400, {metric/amount_Max})\n```";
2
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,kjBA2Bb,CAAC"}
@@ -0,0 +1,29 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# LOG
3
+ The LOG function returns the logarithm of a number for the given base
4
+ specified in second parameter of the LOG function. If the base value is
5
+ omitted, base 10 is used.
6
+
7
+ The LOG function has the following format:
8
+
9
+ \`\`\`
10
+ LOG(n,b)
11
+ \`\`\`
12
+
13
+ - *n* is any positive value
14
+ - *b* is base, *b* is any positive value other than 0 or 1
15
+
16
+ ## Syntax
17
+
18
+ \`\`\`
19
+ SELECT LOG(…)
20
+ SELECT SQRT(number, base)
21
+ \`\`\`
22
+
23
+ ## Examples
24
+
25
+ \`\`\`
26
+ SELECT LOG(10, 1/12)
27
+ SELECT LOG(SUM({fact/amount}), 2)
28
+ SELECT LOG({metric/amount_max} * 400, {metric/amount_Max})
29
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# POWER\nThe POWER function returns a number raised to the base specified as the\nsecond parameter of the POWER function (e.g., Interest rate, Revenue).\nComplex and undefined results are replaced with NULL.\n\nThe POWER function has the following format:\n\n```\nPOWER(n, b)\n```\n\nThe base *n* and the exponent *b* accept any numeric data, including\nmetrics, metric expressions, and constants.\n\nFor fractional exponent (b) values, using fractions (for example, 1/2)\nrather than decimals (for example, 0.5) improves performance.\n\n## Syntax\n\n```\nPOWER(\u2026,\u2026)\nPOWER(number, power)\n```\n\n## Examples\n\n```\nSELECT POWER(10, 1/12)\nSELECT POWER(SUM({fact/amount}), 2)\nSELECT POWER(1, SUM({fact/amount}))\nSELECT POWER({metric/total_amount} * (1/2), {metric/total_amount})\n```";
2
+ //# sourceMappingURL=power.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"power.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/power.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,iyBA+Bb,CAAC"}
@@ -0,0 +1,33 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# POWER
3
+ The POWER function returns a number raised to the base specified as the
4
+ second parameter of the POWER function (e.g., Interest rate, Revenue).
5
+ Complex and undefined results are replaced with NULL.
6
+
7
+ The POWER function has the following format:
8
+
9
+ \`\`\`
10
+ POWER(n, b)
11
+ \`\`\`
12
+
13
+ The base *n* and the exponent *b* accept any numeric data, including
14
+ metrics, metric expressions, and constants.
15
+
16
+ For fractional exponent (b) values, using fractions (for example, 1/2)
17
+ rather than decimals (for example, 0.5) improves performance.
18
+
19
+ ## Syntax
20
+
21
+ \`\`\`
22
+ POWER(…,…)
23
+ POWER(number, power)
24
+ \`\`\`
25
+
26
+ ## Examples
27
+
28
+ \`\`\`
29
+ SELECT POWER(10, 1/12)
30
+ SELECT POWER(SUM({fact/amount}), 2)
31
+ SELECT POWER(1, SUM({fact/amount}))
32
+ SELECT POWER({metric/total_amount} * (1/2), {metric/total_amount})
33
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# ROUND\nThe ROUND() function rounds a fact or metric to the number of decimal\nplaces specified in the second parameter. If the second parameter is not\nspecified, then the function rounds to the nearest integer.\n\nThe input value is rounded to an integer (by default) or to a defined\nnumber of decimal points. This function allows metric builds to retain\nexact levels of precision throughout a set of calculations.\n\n- The first input value can be any constant, fact, metric, or metric\n expression.\n- The optional second parameter defines the number of decimal points\n to which the function applies rounding. This parameter should be an\n integer, although real numbers are supported for input.\n\n## Syntax\n\n```\nSELECT ROUND(\u2026)\nROUND(fact)\nROUND(metric)\nROUND(metric_expression)\nROUND(input, number_of_decimal_places)\n```\n\n## Examples\n\n```\nSELECT ROUND(12.2) = 12\nSELECT ROUND(12.7) = 13\nSELECT ROUND(12.257,2) = 12.26\nSELECT ROUND (12.257,-1) = 10\n```";
2
+ //# sourceMappingURL=round.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"round.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/round.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,0+BAgCb,CAAC"}
@@ -0,0 +1,34 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# ROUND
3
+ The ROUND() function rounds a fact or metric to the number of decimal
4
+ places specified in the second parameter. If the second parameter is not
5
+ specified, then the function rounds to the nearest integer.
6
+
7
+ The input value is rounded to an integer (by default) or to a defined
8
+ number of decimal points. This function allows metric builds to retain
9
+ exact levels of precision throughout a set of calculations.
10
+
11
+ - The first input value can be any constant, fact, metric, or metric
12
+ expression.
13
+ - The optional second parameter defines the number of decimal points
14
+ to which the function applies rounding. This parameter should be an
15
+ integer, although real numbers are supported for input.
16
+
17
+ ## Syntax
18
+
19
+ \`\`\`
20
+ SELECT ROUND(…)
21
+ ROUND(fact)
22
+ ROUND(metric)
23
+ ROUND(metric_expression)
24
+ ROUND(input, number_of_decimal_places)
25
+ \`\`\`
26
+
27
+ ## Examples
28
+
29
+ \`\`\`
30
+ SELECT ROUND(12.2) = 12
31
+ SELECT ROUND(12.7) = 13
32
+ SELECT ROUND(12.257,2) = 12.26
33
+ SELECT ROUND (12.257,-1) = 10
34
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# SIGN\nThe signum (SIGN) function returns a number or metric input as one of\nthe following three values:\n\n- -1 if the number is negative\n- 0 if the number is zero\n- 1 if the number is positive\n\nThe SIGN function follows the rule: \n\n```\nSIGN(number_input) = (number_input)/(abs(number_input))\n```\n\n## Syntax\n\n```\nSELECT SIGN(\u2026)\nSELECT SIGN(number)\nSELECT SIGN(metric)\n```\n\n## Examples\n\n```\nSELECT SIGN(-3) returns the value -1\nSELECT SIGN(3) returns the value 1\nSELECT SIGN(0) returns the value 0\n```";
2
+ //# sourceMappingURL=sign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/sign.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,+hBA4Bb,CAAC"}
@@ -0,0 +1,30 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# SIGN
3
+ The signum (SIGN) function returns a number or metric input as one of
4
+ the following three values:
5
+
6
+ - -1 if the number is negative
7
+ - 0 if the number is zero
8
+ - 1 if the number is positive
9
+
10
+ The SIGN function follows the rule:
11
+
12
+ \`\`\`
13
+ SIGN(number_input) = (number_input)/(abs(number_input))
14
+ \`\`\`
15
+
16
+ ## Syntax
17
+
18
+ \`\`\`
19
+ SELECT SIGN(…)
20
+ SELECT SIGN(number)
21
+ SELECT SIGN(metric)
22
+ \`\`\`
23
+
24
+ ## Examples
25
+
26
+ \`\`\`
27
+ SELECT SIGN(-3) returns the value -1
28
+ SELECT SIGN(3) returns the value 1
29
+ SELECT SIGN(0) returns the value 0
30
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# SQRT\nThe square root function (SQRT) returns a square root of a number (e.g.,\nRevenue). If the number is negative, SQRT returns NULL.\n\n## Syntax\n\n```\nSELECT SQRT(\u2026)\nSELECT SQRT(constant)\nSELECT SQRT(metric)\n```\n\n## Examples\n\n```\nSELECT SQRT(25)\n```\n\nreturns the value \"5\"\n\n```\nSELECT SQRT(33.6)\n```\n\nreturns the value \"5.796550698\"\n\n```\nSELECT SQRT(SELECT SUM({fact/sales}))\n```\n\nreturns the square root of a Total Sales metric.";
2
+ //# sourceMappingURL=sqrt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqrt.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/sqrt.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,0dA8B6B,CAAC"}
@@ -0,0 +1,32 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# SQRT
3
+ The square root function (SQRT) returns a square root of a number (e.g.,
4
+ Revenue). If the number is negative, SQRT returns NULL.
5
+
6
+ ## Syntax
7
+
8
+ \`\`\`
9
+ SELECT SQRT(…)
10
+ SELECT SQRT(constant)
11
+ SELECT SQRT(metric)
12
+ \`\`\`
13
+
14
+ ## Examples
15
+
16
+ \`\`\`
17
+ SELECT SQRT(25)
18
+ \`\`\`
19
+
20
+ returns the value \"5\"
21
+
22
+ \`\`\`
23
+ SELECT SQRT(33.6)
24
+ \`\`\`
25
+
26
+ returns the value \"5.796550698\"
27
+
28
+ \`\`\`
29
+ SELECT SQRT(SELECT SUM({fact/sales}))
30
+ \`\`\`
31
+
32
+ returns the square root of a Total Sales metric.`;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# TRUNC\nThe TRUNC functions truncates a number based on the number of decimal\nplaces specified in the second parameter.\n\nBy default, the TRUNC() function allows you to remove all digits to the\nright of the decimal point without applying rounding. If a second\noptional parameter is added to the TRUNC() function, it defines the\nnumber of digits to the right of the decimal point at which truncation\nis applied. Negative values are supported for the second parameter.\n\n- The first input value can be any constant, fact, metric, or metric\n expression.\n- The optional second parameter defines the number of decimal points\n at which the remaining digits are removed. This parameter should be\n an integer, although real numbers are supported for input.\n\n## Syntax\n\n```\nSELECT TRUNC(\u2026)\nTRUNC(constant)\nTRUNC(fact)\nTRUNC(metric)\nTRUNC(metric_expression)\nTRUNC(input, number_of_decimal_places)\n```\n\n## Examples\n\n```\nSELECT TRUNC(12.2) = 12\nSELECT TRUNC(12.7) = 12\nSELECT TRUNC(12.257,2) = 12.25\nSELECT TRUNC(1255.257,-2) = 1200\n```";
2
+ //# sourceMappingURL=trunc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trunc.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/math/trunc.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,ujCAkCb,CAAC"}
@@ -0,0 +1,36 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# TRUNC
3
+ The TRUNC functions truncates a number based on the number of decimal
4
+ places specified in the second parameter.
5
+
6
+ By default, the TRUNC() function allows you to remove all digits to the
7
+ right of the decimal point without applying rounding. If a second
8
+ optional parameter is added to the TRUNC() function, it defines the
9
+ number of digits to the right of the decimal point at which truncation
10
+ is applied. Negative values are supported for the second parameter.
11
+
12
+ - The first input value can be any constant, fact, metric, or metric
13
+ expression.
14
+ - The optional second parameter defines the number of decimal points
15
+ at which the remaining digits are removed. This parameter should be
16
+ an integer, although real numbers are supported for input.
17
+
18
+ ## Syntax
19
+
20
+ \`\`\`
21
+ SELECT TRUNC(…)
22
+ TRUNC(constant)
23
+ TRUNC(fact)
24
+ TRUNC(metric)
25
+ TRUNC(metric_expression)
26
+ TRUNC(input, number_of_decimal_places)
27
+ \`\`\`
28
+
29
+ ## Examples
30
+
31
+ \`\`\`
32
+ SELECT TRUNC(12.2) = 12
33
+ SELECT TRUNC(12.7) = 12
34
+ SELECT TRUNC(12.257,2) = 12.25
35
+ SELECT TRUNC(1255.257,-2) = 1200
36
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# PERCENTILE\nThe PERCENTILE( ) function returns the specified percentile out of a set of values. This could be useful for establishing a threshold of\nacceptance, such as for candidates who score above the 90th percentile\non a certification exam, or rewarding sales reps in the top percentile\nwith regard to deals won in the past year.\n\n**Formats:**\n\n```\nPERCENTILE(numeric, k)\n```\n\n- where *numeric* is a fact or metric\n- where *k* is a value between 0 and 1 representing the percentile you\n want returned specified as a decimal. k accepts constants as inputs.\n Numeric values must be expressed in the following format: 0.xx\n- For metric expressions, you should compute percentiles using syntax\n similar to the following:\n\n ```\n SELECT PERCENTILE((SELECT SUM([fact]) BY [attribute]),0.25)\n ```\n\n ```\n PERCENTILE(numeric, k%)\n ```\n\n- where *numeric* is a fact or metric\n- where *k%* is a number between 0 and 100 representing the percentile\n you want returned. k accepts constants as inputs, followed by\n percent signs as inputs.\n- For metric expressions, you should compute percentiles using syntax\n similar to the following: \n\n ```\n SELECT PERCENTILE((SELECT SUM([fact]) BY [attribute]),25%)\n ```\n\n## Syntax\n\n```\nSELECT PERCENTILE(\u2026) [ASC|DESC] [BY(\u2026)]\nSELECT PERCENTILE(metric, decimal)\nSELECT PERCENTILE(metric, percentage)\nSELECT PERCENTILE(fact, decimal)\nSELECT PERCENTILE(fact, percentage)\nSELECT PERCENTILE((SELECT SUM([metric]) BY [attribute]), decimal)\nSELECT PERCENTILE((SELECT SUM([metric]) BY [attribute]), percentage)\n```\n\n## Examples\n\n```\nSELECT PERCENTILE({metric/Amount}, 0.75)\nSELECT PERCENTILE({metric/Amount}, 75%)\n```";
2
+ //# sourceMappingURL=percentile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"percentile.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/ranking/percentile.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,ouDAuDb,CAAC"}
@@ -0,0 +1,57 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# PERCENTILE
3
+ The PERCENTILE( ) function returns the specified percentile out of a set of values. This could be useful for establishing a threshold of
4
+ acceptance, such as for candidates who score above the 90th percentile
5
+ on a certification exam, or rewarding sales reps in the top percentile
6
+ with regard to deals won in the past year.
7
+
8
+ **Formats:**
9
+
10
+ \`\`\`
11
+ PERCENTILE(numeric, k)
12
+ \`\`\`
13
+
14
+ - where *numeric* is a fact or metric
15
+ - where *k* is a value between 0 and 1 representing the percentile you
16
+ want returned specified as a decimal. k accepts constants as inputs.
17
+ Numeric values must be expressed in the following format: 0.xx
18
+ - For metric expressions, you should compute percentiles using syntax
19
+ similar to the following:
20
+
21
+ \`\`\`
22
+ SELECT PERCENTILE((SELECT SUM([fact]) BY [attribute]),0.25)
23
+ \`\`\`
24
+
25
+ \`\`\`
26
+ PERCENTILE(numeric, k%)
27
+ \`\`\`
28
+
29
+ - where *numeric* is a fact or metric
30
+ - where *k%* is a number between 0 and 100 representing the percentile
31
+ you want returned. k accepts constants as inputs, followed by
32
+ percent signs as inputs.
33
+ - For metric expressions, you should compute percentiles using syntax
34
+ similar to the following:
35
+
36
+ \`\`\`
37
+ SELECT PERCENTILE((SELECT SUM([fact]) BY [attribute]),25%)
38
+ \`\`\`
39
+
40
+ ## Syntax
41
+
42
+ \`\`\`
43
+ SELECT PERCENTILE(…) [ASC|DESC] [BY(…)]
44
+ SELECT PERCENTILE(metric, decimal)
45
+ SELECT PERCENTILE(metric, percentage)
46
+ SELECT PERCENTILE(fact, decimal)
47
+ SELECT PERCENTILE(fact, percentage)
48
+ SELECT PERCENTILE((SELECT SUM([metric]) BY [attribute]), decimal)
49
+ SELECT PERCENTILE((SELECT SUM([metric]) BY [attribute]), percentage)
50
+ \`\`\`
51
+
52
+ ## Examples
53
+
54
+ \`\`\`
55
+ SELECT PERCENTILE({metric/Amount}, 0.75)
56
+ SELECT PERCENTILE({metric/Amount}, 75%)
57
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Rank Variations\nMAQL includes the following ranking functions that sequentially rank all values in a visualization.\n\n\nThe following ranking functions differ from the TOP(n) and\nBOTTOM(n) filters which filter only for a specified number of top or\nbottom values (such as the top five or bottom five sales reps).\n\n\n| Function | Definition |\n|--------------|------------------------------------------------------|\n| RANK | Assigns a rank to each value in a set of values, leaving gaps between rows of duplicate values (ties) within the set. If any values within a set are the same (tied), the next rank following the tie is skipped, resulting in **non-consecutive ranking**. |\n| DENSE_RANK | Assigns a rank to each value in a set of values, leaving no gaps between rows of duplicate values (ties) within the set. If any values within a set are the same (tied), the next rank following the tie is not skipped and the **ranking remains consecutive**. |\n| ROW_NUMBER | Assigns a unique row number, starting from 1, to every row within a set of values, regardless of duplicate values (ties) within the set. |\n| PERCENT_RANK | In a set of values, calculates the number of values that are less than the current value, minus 1, divided by the total number of values in the set, minus 1. The first value in any set has a PERCENT_RANK of zero. * (relative rank of the current value - 1) / (number of values in the set - 1)* |\n| CUME_DIST | In a set of values, calculates the number of values that are less than or equal to the current value (inclusive), divided by the total number of values in the set (cumulative distribution). ( *relative rank of the current value) / (number of values in the set* |\n\nFor more information about the WITHIN clause used in the following\nexamples, see [WITHIN Clause](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/within-clause/).\n\n## RANK and DENSE_RANK\n\nThough similar, the RANK and DENSE_RANK functions differ in the way each\nranks the first row that follows rows of duplicate values.\n\nIn the following illustration, see how the output of RANK skips ranks\n(leaves a gap), whereas DENSE_RANK does not skip ranks (leaves no gap).\n\n![Comparison of RANK and DENSE_RANK](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-dense-rank.png)\n\n- **RANK** identifies Crystal Powers as the fourth-highest ranking\n Sales Rep in terms of number of wins in Telecom, Midwest.\n\n ```\n SELECT RANK ({metric/no_of_wins}) DESC WITHIN({attribute/region}, {attribute/vertical})\n ```\n\n- **DENSE_RANK** identifies Crystal Powers as the Sales Rep with the\n second-highest number of wins in Telecom, Midwest.\n\n ```\n SELECT DENSE_RANK ({metric/no_of_wins}) DESC WITHIN({attribute/region}, {attribute/vertical})\n ```\n\n## ROW_NUMBER\n\nThe ROW_NUMBER function assigns a unique number to every row in a set,\nregardless of duplicate values within the set.\n\n```\nSELECT ROW_NUMBER({metric/no_of_wins}) DESC WITHIN ({attribute/region}, {attribute/vertical})\n```\n\nThe following illustration shows how ROW_NUMBER can be used with the\nWITHIN clause (see [WITHIN Clause](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/within-clause/) to\nreturn unique row numbers for several subgroups in a visualization. The\npresence of duplicate values (ties) in the Number of Wins column has no\neffect on ROW_NUMBER. \n\n![ROW_NUMBER](https://www.gooddata.com/developers/cloud-native/doc/maql/row-numbers.png)\n\n## CUME_DIST and PERCENT_RANK\n\nThe CUME_DIST and PERCENT_RANK functions are very similar.\n\nThe following statements clarify how they differ.\n\n- **CUME_DIST** (cumulative distribution) returns a number greater\n than 0 and up to and including 1 which represents the relative\n position of the value in the specified row within a group\n of *N* rows. In the following figure, the CUME_DIST calculation\n shows that 75% of sales reps in Financial, Midwest have Number of\n Wins that are less than or equal to those of Franklin Vic.\n\n ```\n SELECT CUME_DIST ({metric/no_of_wins}) WITHIN({attribute/region}, {attribute/vertical})\n ```\n\n- **PERCENT_RANK** returns a number from 0 to 1 (inclusive) which\n represents the relative position of the specified row, minus 1,\n within a group of *N* rows, minus 1. In the following figure, the\n PERCENT_RANK calculation shows that Franklin Vic is at the 67%\n percentile in terms of total Number of Wins in his group.\n\n ```\n SELECT PERCENT_RANK ({metric/no_of_wins}) WITHIN({attribute/region}, {attribute/vertical})\n ```\n\n![Comparison of CUME_DIST and PERCENT_RANK](https://www.gooddata.com/developers/cloud-native/doc/maql/cume-dist-percent-rank.png)";
2
+ //# sourceMappingURL=rank-variations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rank-variations.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/ranking/rank-variations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,i0JAwF8G,CAAC"}
@@ -0,0 +1,90 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Rank Variations
3
+ MAQL includes the following ranking functions that sequentially rank all values in a visualization.
4
+
5
+
6
+ The following ranking functions differ from the TOP(n) and
7
+ BOTTOM(n) filters which filter only for a specified number of top or
8
+ bottom values (such as the top five or bottom five sales reps).
9
+
10
+
11
+ | Function | Definition |
12
+ |--------------|------------------------------------------------------|
13
+ | RANK | Assigns a rank to each value in a set of values, leaving gaps between rows of duplicate values (ties) within the set. If any values within a set are the same (tied), the next rank following the tie is skipped, resulting in **non-consecutive ranking**. |
14
+ | DENSE_RANK | Assigns a rank to each value in a set of values, leaving no gaps between rows of duplicate values (ties) within the set. If any values within a set are the same (tied), the next rank following the tie is not skipped and the **ranking remains consecutive**. |
15
+ | ROW_NUMBER | Assigns a unique row number, starting from 1, to every row within a set of values, regardless of duplicate values (ties) within the set. |
16
+ | PERCENT_RANK | In a set of values, calculates the number of values that are less than the current value, minus 1, divided by the total number of values in the set, minus 1. The first value in any set has a PERCENT_RANK of zero. *\ (relative rank of the current value - 1) / (number of values in the set - 1)* |
17
+ | CUME_DIST | In a set of values, calculates the number of values that are less than or equal to the current value (inclusive), divided by the total number of values in the set (cumulative distribution). (\ *relative rank of the current value) / (number of values in the set* |
18
+
19
+ For more information about the WITHIN clause used in the following
20
+ examples, see [WITHIN Clause](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/within-clause/).
21
+
22
+ ## RANK and DENSE_RANK
23
+
24
+ Though similar, the RANK and DENSE_RANK functions differ in the way each
25
+ ranks the first row that follows rows of duplicate values.
26
+
27
+ In the following illustration, see how the output of RANK skips ranks
28
+ (leaves a gap), whereas DENSE_RANK does not skip ranks (leaves no gap).
29
+
30
+ ![Comparison of RANK and DENSE_RANK](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-dense-rank.png)
31
+
32
+ - **RANK** identifies Crystal Powers as the fourth-highest ranking
33
+ Sales Rep in terms of number of wins in Telecom, Midwest.
34
+
35
+ \`\`\`
36
+ SELECT RANK ({metric/no_of_wins}) DESC WITHIN({attribute/region}, {attribute/vertical})
37
+ \`\`\`
38
+
39
+ - **DENSE_RANK** identifies Crystal Powers as the Sales Rep with the
40
+ second-highest number of wins in Telecom, Midwest.
41
+
42
+ \`\`\`
43
+ SELECT DENSE_RANK ({metric/no_of_wins}) DESC WITHIN({attribute/region}, {attribute/vertical})
44
+ \`\`\`
45
+
46
+ ## ROW_NUMBER
47
+
48
+ The ROW_NUMBER function assigns a unique number to every row in a set,
49
+ regardless of duplicate values within the set.
50
+
51
+ \`\`\`
52
+ SELECT ROW_NUMBER({metric/no_of_wins}) DESC WITHIN ({attribute/region}, {attribute/vertical})
53
+ \`\`\`
54
+
55
+ The following illustration shows how ROW_NUMBER can be used with the
56
+ WITHIN clause (see [WITHIN Clause](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/within-clause/) to
57
+ return unique row numbers for several subgroups in a visualization. The
58
+ presence of duplicate values (ties) in the Number of Wins column has no
59
+ effect on ROW_NUMBER.
60
+
61
+ ![ROW_NUMBER](https://www.gooddata.com/developers/cloud-native/doc/maql/row-numbers.png)
62
+
63
+ ## CUME_DIST and PERCENT_RANK
64
+
65
+ The CUME_DIST and PERCENT_RANK functions are very similar.
66
+
67
+ The following statements clarify how they differ.
68
+
69
+ - **CUME_DIST** (cumulative distribution) returns a number greater
70
+ than 0 and up to and including 1 which represents the relative
71
+ position of the value in the specified row within a group
72
+ of *N* rows. In the following figure, the CUME_DIST calculation
73
+ shows that 75% of sales reps in Financial, Midwest have Number of
74
+ Wins that are less than or equal to those of Franklin Vic.
75
+
76
+ \`\`\`
77
+ SELECT CUME_DIST ({metric/no_of_wins}) WITHIN({attribute/region}, {attribute/vertical})
78
+ \`\`\`
79
+
80
+ - **PERCENT_RANK** returns a number from 0 to 1 (inclusive) which
81
+ represents the relative position of the specified row, minus 1,
82
+ within a group of *N* rows, minus 1. In the following figure, the
83
+ PERCENT_RANK calculation shows that Franklin Vic is at the 67%
84
+ percentile in terms of total Number of Wins in his group.
85
+
86
+ \`\`\`
87
+ SELECT PERCENT_RANK ({metric/no_of_wins}) WITHIN({attribute/region}, {attribute/vertical})
88
+ \`\`\`
89
+
90
+ ![Comparison of CUME_DIST and PERCENT_RANK](https://www.gooddata.com/developers/cloud-native/doc/maql/cume-dist-percent-rank.png)`;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# TOP or BOTTOM(n) IN\nWHERE TOP|BOTTOM IN is a ranking filter. It limits the inputs into a\nmetric's computations to those values that are the top or bottom *n*\nrankings according to the ranking criteria that you specify. This filter\nsupports the percent parameters *n%*.\n\nWhen you are using filters with a percentage (such as `TOP(20%)`), the\nnumber of the selected items is always rounded **up**.\n\nFor example, you want to select 20% of 21 items, and each item has a\ndistinct value of the metric that it is ranked by. The result is going\nto be 5, because 20% of 21 is 4.2, and it gets rounded up to 5.\n\n## Syntax\n\n```\nSELECT \u2026 WHERE TOP(\u2026) IN \u2026 WITHIN \u2026\nSELECT metric1 WHERE TOP(n) IN (SELECT metric2 BY attribute1, attribute2...) WITHIN (...)\n```\n\nHere, `metric1` represents the metric the value of which is actually returned.\nThe value returned depends on which values are included in its\ncomputations. These inputs are determined by the filtering criteria\nstatement that follows the IN keyword in parentheses.\n\nThe attributes that follow BY are those that will be ranked according to their `metric2` values. Whichever attribute values are associated with\n`metric2` values that fall in the TOP(n) or BOTTOM(n) are then included\nin `metric1` computations - determining the final output.\n\nThe syntax for this type of rank filtering requires the SELECT keyword\nbefore the metric following the IN keyword.\n\n## Examples\n\n```\nSELECT {metric/no_of_tickets} WHERE TOP(5) IN (SELECT {metric/no_of_tickets} 2 BY {attribute/assignee}) WITHIN ({attribute/ticket_group}, all other)\n```\n\nThis example returns TOP(#) assignees by EACH group. \n\n```\nSELECT {metric/Amount} WHERE TOP(5) IN (SELECT {metric/avg_won} BY {attribute/product})\n```\n\nMAQL also supports using the OF keyword following the TOP|BOTTOM ranking\nfilter. This changes the way the metric is interpreted by the query\nengine. With OF you can carry out rankings by more than one metric.\nLikewise, the ranking metric is interpreted as a submetric, rather than\na subreport (as is the case for TOP|BOTTOM in conjunction with the IN\nkeyword).\n\nSee also [TOP or BOTTOM(n) OF](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/where-top-or-bottom-of/).";
2
+ //# sourceMappingURL=where-top-or-bottom-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"where-top-or-bottom-in.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-in.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,uwEAmD6H,CAAC"}
@@ -0,0 +1,53 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# TOP or BOTTOM(n) IN
3
+ WHERE TOP|BOTTOM IN is a ranking filter. It limits the inputs into a
4
+ metric's computations to those values that are the top or bottom *n*
5
+ rankings according to the ranking criteria that you specify. This filter
6
+ supports the percent parameters *n%*.
7
+
8
+ When you are using filters with a percentage (such as \`TOP(20%)\`), the
9
+ number of the selected items is always rounded **up**.
10
+
11
+ For example, you want to select 20% of 21 items, and each item has a
12
+ distinct value of the metric that it is ranked by. The result is going
13
+ to be 5, because 20% of 21 is 4.2, and it gets rounded up to 5.
14
+
15
+ ## Syntax
16
+
17
+ \`\`\`
18
+ SELECT … WHERE TOP(…) IN … WITHIN …
19
+ SELECT metric1 WHERE TOP(n) IN (SELECT metric2 BY attribute1, attribute2...) WITHIN (...)
20
+ \`\`\`
21
+
22
+ Here, \`metric1\` represents the metric the value of which is actually returned.
23
+ The value returned depends on which values are included in its
24
+ computations. These inputs are determined by the filtering criteria
25
+ statement that follows the IN keyword in parentheses.
26
+
27
+ The attributes that follow BY are those that will be ranked according to their \`metric2\` values. Whichever attribute values are associated with
28
+ \`metric2\` values that fall in the TOP(n) or BOTTOM(n) are then included
29
+ in \`metric1\` computations - determining the final output.
30
+
31
+ The syntax for this type of rank filtering requires the SELECT keyword
32
+ before the metric following the IN keyword.
33
+
34
+ ## Examples
35
+
36
+ \`\`\`
37
+ SELECT {metric/no_of_tickets} WHERE TOP(5) IN (SELECT {metric/no_of_tickets} 2 BY {attribute/assignee}) WITHIN ({attribute/ticket_group}, all other)
38
+ \`\`\`
39
+
40
+ This example returns TOP(#) assignees by EACH group.
41
+
42
+ \`\`\`
43
+ SELECT {metric/Amount} WHERE TOP(5) IN (SELECT {metric/avg_won} BY {attribute/product})
44
+ \`\`\`
45
+
46
+ MAQL also supports using the OF keyword following the TOP|BOTTOM ranking
47
+ filter. This changes the way the metric is interpreted by the query
48
+ engine. With OF you can carry out rankings by more than one metric.
49
+ Likewise, the ranking metric is interpreted as a submetric, rather than
50
+ a subreport (as is the case for TOP|BOTTOM in conjunction with the IN
51
+ keyword).
52
+
53
+ See also [TOP or BOTTOM(n) OF](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/where-top-or-bottom-of/).`;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# TOP or BOTTOM(n) OF\nSimilar to [WHERE TOP or BOTTOM(n) IN](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/where-top-or-bottom-in/), WHERE TOP or\nBOTTOM OF can serve as a filter that limits the values included in the\nmetric's computations. Using the OF keyword (rather than IN) allows\nranking of more than one metric and interprets the ranking metric as a sub-metric.\n\nThis filter supports percent parameters: *n%*.\n\nWhen you are using filters with a percentage (such as `TOP(20%)`), the\nnumber of the selected items is always rounded **up**.\n\nFor example, you want to select 20% of 21 items, and each item has a\ndistinct value of the metric that it is ranked by. The result is going\nto be 5, because 20% of 21 is 4.2, and it gets rounded up to 5.\n\n## Syntax\n\n```\nSELECT \u2026 WHERE TOP(\u2026) OF \u2026 [WITHIN \u2026]\nSELECT metric1 WHERE [TOP|BOTTOM](n) OF ( metric2 , ...)\nSELECT metric1 WHERE [TOP|BOTTOM](n) OF ( metric2 , ...) WITHIN ( ... )\n```\n\n## Examples\n\n```\nSELECT {metric/amount} WHERE TOP(5%) OF ({metric/Amount}) AND {label/product} = \"Explorer\"\n```";
2
+ //# sourceMappingURL=where-top-or-bottom-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"where-top-or-bottom-of.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/ranking/where-top-or-bottom-of.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,4nCA2Bb,CAAC"}
@@ -0,0 +1,29 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# TOP or BOTTOM(n) OF
3
+ Similar to [WHERE TOP or BOTTOM(n) IN](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/where-top-or-bottom-in/), WHERE TOP or
4
+ BOTTOM OF can serve as a filter that limits the values included in the
5
+ metric's computations. Using the OF keyword (rather than IN) allows
6
+ ranking of more than one metric and interprets the ranking metric as a sub-metric.
7
+
8
+ This filter supports percent parameters: *n%*.
9
+
10
+ When you are using filters with a percentage (such as \`TOP(20%)\`), the
11
+ number of the selected items is always rounded **up**.
12
+
13
+ For example, you want to select 20% of 21 items, and each item has a
14
+ distinct value of the metric that it is ranked by. The result is going
15
+ to be 5, because 20% of 21 is 4.2, and it gets rounded up to 5.
16
+
17
+ ## Syntax
18
+
19
+ \`\`\`
20
+ SELECT … WHERE TOP(…) OF … [WITHIN …]
21
+ SELECT metric1 WHERE [TOP|BOTTOM](n) OF ( metric2 , ...)
22
+ SELECT metric1 WHERE [TOP|BOTTOM](n) OF ( metric2 , ...) WITHIN ( ... )
23
+ \`\`\`
24
+
25
+ ## Examples
26
+
27
+ \`\`\`
28
+ SELECT {metric/amount} WHERE TOP(5%) OF ({metric/Amount}) AND {label/product} = "Explorer"
29
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# WITHIN Clause\nYou can add variations of the WITHIN clause to any supported [Rank Variations](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/rank-variations/). This syntax lets you rank\nvalues within subgroups defined by a visualization's attribute values.\nSubgroup ranking is useful, for example, if you want to rank the top\nsales reps (in terms of amount won) within each sales region.\n\n## Ranking functions without WITHIN\n\nWhen you use a ranking function without an accompanying WITHIN clause\n(for example, `SELECT RANK({metric/avg_won})`), the function sequentially ranks\nall metric values across the rows in a visualization. The output is identical\nto `RANK(...) WITHIN(ALL IN ALL OTHER DIMENSIONS)`, as displayed below.\n\n```\nSELECT RANK ({metric/amount_won})\n```\n\n![RANK without the WITHIN clause](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-without-within.png)\n\n## Ranking functions with WITHIN\n\nWhen you use ranking functions with an accompanying WITHIN clause, any\nnumber of parameter formulations are possible, resulting in different\noutputs.\n\n```\nWITHIN (attribute1, attribute2, ...)\n```\n\nRanks metric values within one or more subgroups defined by the\ninsight's attributes.\n\n```\nSELECT RANK ({metric/{amount_won}) DESC WITHIN ({attribute/vertical}, {attribute/region})\n```\n\n![WITHIN (Region,Vertical)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within.png )\n\n## WITHIN (ALL ATTRIBUTE)\n\nRanks metric values within one or more subgroups defined by all visualization\nattributes **other than** the attribute specified in the metric (and any\nother attributes in the same dataset as the attribute specified in the\nmetric).\n\nIf the ranking metric is a stand-alone metric, then it will rank as\ndescribed in [Rank Variations](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/rank-variations/).\n\n```\nSELECT RANK ({metric/{amount_won}) DESC WITHIN (ALL {attribute/vertical})\n```\n\nFor example, if Vertical, Region, and Sales Rep attributes are included\nin the visualization, the above metric ranks metric values sequentially by\nRegion and Sales Rep, but not by Vertical.\n\n\n![WITHIN (ALL Vertical)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-all.png )\n\nNotice that if you remove Vertical from the visualization, the\nranking of Amount Won remains the same as before because the WITHIN ALL\nclause omits Vertical from the rankings.\n\nRanking remains the same when the Vertical attribute is removed from the visualization.\n\n![Rank the same](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-the-same.png)\n\n\n## WITHIN (ALL OTHER EXCEPT ATTRIBUTE)\n\nRanks metric values within one or more subgroups defined by the\nattribute specified in the metric (or any other attributes in the same\ndataset as the attribute specified in the metric), but **overrides** all\nother visualization attributes.\n\n```\nSELECT RANK ({metric/{amount_won}) DESC WITHIN (ALL OTHER EXCEPT {attribute/vertical})\n```\n\nIf Vertical and Region attributes are included in the visualization, the above\nmetric ranks Amount Won sequentially by Vertical, but not by Region.\n\n![WITHIN (ALL Vertical), Vertical removed from the visualization](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-removed.png )\n\n## WITHIN (CURRENT)\n\nRanks metric values within current visualization's dimensionality, as\nspecified by the visualization's attributes, where every row of the visualization is\nhandled as a separate group and thus each value is ranked '1'. \n\n```\nSELECT RANK ({metric/{amount_won}) DESC WITHIN (CURRENT)\n```\n\n![WITHIN (CURRENT)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-current.png )\n\nAn exception to the above would occur if you used WITHIN (CURRENT) with\nthe PERCENT_RANK function. That combination would return the percentage\nof metric values that are less than the current value, which is\nnecessarily zero in a single-value \"group.\"";
2
+ //# sourceMappingURL=within-clause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"within-clause.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/ranking/within-clause.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,2gIAmG0B,CAAC"}