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

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,101 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# WITHIN Clause
3
+ You 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
4
+ values within subgroups defined by a visualization's attribute values.
5
+ Subgroup ranking is useful, for example, if you want to rank the top
6
+ sales reps (in terms of amount won) within each sales region.
7
+
8
+ ## Ranking functions without WITHIN
9
+
10
+ When you use a ranking function without an accompanying WITHIN clause
11
+ (for example, \`SELECT RANK({metric/avg_won})\`), the function sequentially ranks
12
+ all metric values across the rows in a visualization. The output is identical
13
+ to \`RANK(...) WITHIN(ALL IN ALL OTHER DIMENSIONS)\`, as displayed below.
14
+
15
+ \`\`\`
16
+ SELECT RANK ({metric/amount_won})
17
+ \`\`\`
18
+
19
+ ![RANK without the WITHIN clause](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-without-within.png)
20
+
21
+ ## Ranking functions with WITHIN
22
+
23
+ When you use ranking functions with an accompanying WITHIN clause, any
24
+ number of parameter formulations are possible, resulting in different
25
+ outputs.
26
+
27
+ \`\`\`
28
+ WITHIN (attribute1, attribute2, ...)
29
+ \`\`\`
30
+
31
+ Ranks metric values within one or more subgroups defined by the
32
+ insight\'s attributes.
33
+
34
+ \`\`\`
35
+ SELECT RANK ({metric/{amount_won}) DESC WITHIN ({attribute/vertical}, {attribute/region})
36
+ \`\`\`
37
+
38
+ ![WITHIN (Region,Vertical)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within.png )
39
+
40
+ ## WITHIN (ALL ATTRIBUTE)
41
+
42
+ Ranks metric values within one or more subgroups defined by all visualization
43
+ attributes **other than** the attribute specified in the metric (and any
44
+ other attributes in the same dataset as the attribute specified in the
45
+ metric).
46
+
47
+ If the ranking metric is a stand-alone metric, then it will rank as
48
+ described in [Rank Variations](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/ranking/rank-variations/).
49
+
50
+ \`\`\`
51
+ SELECT RANK ({metric/{amount_won}) DESC WITHIN (ALL {attribute/vertical})
52
+ \`\`\`
53
+
54
+ For example, if Vertical, Region, and Sales Rep attributes are included
55
+ in the visualization, the above metric ranks metric values sequentially by
56
+ Region and Sales Rep, but not by Vertical.
57
+
58
+
59
+ ![WITHIN (ALL Vertical)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-all.png )
60
+
61
+ Notice that if you remove Vertical from the visualization, the
62
+ ranking of Amount Won remains the same as before because the WITHIN ALL
63
+ clause omits Vertical from the rankings.
64
+
65
+ Ranking remains the same when the Vertical attribute is removed from the visualization.
66
+
67
+ ![Rank the same](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-the-same.png)
68
+
69
+
70
+ ## WITHIN (ALL OTHER EXCEPT ATTRIBUTE)
71
+
72
+ Ranks metric values within one or more subgroups defined by the
73
+ attribute specified in the metric (or any other attributes in the same
74
+ dataset as the attribute specified in the metric), but **overrides** all
75
+ other visualization attributes.
76
+
77
+ \`\`\`
78
+ SELECT RANK ({metric/{amount_won}) DESC WITHIN (ALL OTHER EXCEPT {attribute/vertical})
79
+ \`\`\`
80
+
81
+ If Vertical and Region attributes are included in the visualization, the above
82
+ metric ranks Amount Won sequentially by Vertical, but not by Region.
83
+
84
+ ![WITHIN (ALL Vertical), Vertical removed from the visualization](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-removed.png )
85
+
86
+ ## WITHIN (CURRENT)
87
+
88
+ Ranks metric values within current visualization's dimensionality, as
89
+ specified by the visualization's attributes, where every row of the visualization is
90
+ handled as a separate group and thus each value is ranked \'1\'.
91
+
92
+ \`\`\`
93
+ SELECT RANK ({metric/{amount_won}) DESC WITHIN (CURRENT)
94
+ \`\`\`
95
+
96
+ ![WITHIN (CURRENT)](https://www.gooddata.com/developers/cloud-native/doc/maql/rank-within-current.png )
97
+
98
+ An exception to the above would occur if you used WITHIN (CURRENT) with
99
+ the PERCENT_RANK function. That combination would return the percentage
100
+ of metric values that are less than the current value, which is
101
+ necessarily zero in a single-value \"group.\"`;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Relational Operators\nRelational operators can be used with facts, metrics, or date labels to\ndefine filter conditions on a metric.\n\n## Syntax\n\n```\nSELECT \u2026 WHERE \u2026 (<|>|=|!=|<>|BETWEEN) \u2026\nSELECT metric WHERE fact1 < fact2\nSELECT metric WHERE fact1 < number\nSELECT metric1 WHERE metric2 > number\nSELECT metric WHERE date_label > date_value\nSELECT metric WHERE date1_label < date2_label\nSELECT metric WHERE attribute = attribute_value\nSELECT metric WHERE attribute <> attribute_value\nSELECT metric WHERE label IN (label_value1, label_value2)\nSELECT metric WHERE label NOT IN (label_value1, label_value2)\nSELECT metric WHERE fact BETWEEN number AND number\nSELECT metric WHERE date_label BETWEEN date_value1 AND date_value2\nSELECT metric WHERE fact NOT BETWEEN number AND metric\nSELECT metric WHERE attribute = NULL\nSELECT metric WHERE attribute <> NULL\nSELECT metric WHERE label IN (label_value1, label_value2, NULL)\nSELECT metric WHERE label NOT IN (label_value1, label_value2, NULL)\n```\n\n## Examples\n\n```\nSELECT {metric/number of transactions} WHERE {metric/total_amount} > 10000\nSELECT {metric/number_of_transactions} WHERE {metric/amount} > 6 AND {metric/amount} <= 20\nSELECT {metric/profit} WHERE {label/date_ordered.monthYear} < \"2007-05\"\nSELECT {metric/profit} WHERE {label/date_ordered.year} > \"2007\"\nSELECT {metric/profit} WHERE {label/date_ordered.date} <= \"2010-12-22\"\nSELECT {metric/profit} WHERE {label/date_ordered.week} < {label/date_shipped.week}\nSELECT {metric/payment} WHERE {label/country} = \"US\"\nSELECT {metric/payment} WHERE {label/date_ordered.week} = {label/date_shipped.week}\nSELECT {metric/payment} WHERE {label/country} <> \"US\"\nSELECT {metric/payment} WHERE {label/region} IN (\"America\", \"EU\")\nSELECT {metric/payment} WHERE {label/region} NOT IN (\"America\", \"EU\")\nSELECT {metric/payment} WHERE {label/date.quarter} BETWEEN THIS - 5 AND THIS\nSELECT {metric/payment} WHERE {fact/cost} BETWEEN 100 AND 200\nSELECT {metric/payment} WHERE {fact/cost} BETWEEN 100 AND {metric/highest_cost}\nSELECT {metric/payment} WHERE {label/country} = NULL\nSELECT {metric/payment} WHERE {label/country} <> NULL\nSELECT {metric/payment} WHERE {label/region} IN (\"America\", \"EU\", NULL)\nSELECT {metric/payment} WHERE {label/region} NOT IN (\"America\", \"EU\", NULL)\n```\n>A comparison of attribute values with NULL using MAQL relational operators translates to semantics of ``IS NULL``/ ``IS NOT NULL`` operators in SQL.";
2
+ //# sourceMappingURL=relational-operators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relational-operators.d.ts","sourceRoot":"","sources":["../../../../../../src/docs/en/docs/create-metrics/maql/relational-operators.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,88EAgD0I,CAAC"}
@@ -0,0 +1,50 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Relational Operators
3
+ Relational operators can be used with facts, metrics, or date labels to
4
+ define filter conditions on a metric.
5
+
6
+ ## Syntax
7
+
8
+ \`\`\`
9
+ SELECT … WHERE … (<|>|=|!=|<>|BETWEEN) …
10
+ SELECT metric WHERE fact1 < fact2
11
+ SELECT metric WHERE fact1 < number
12
+ SELECT metric1 WHERE metric2 > number
13
+ SELECT metric WHERE date_label > date_value
14
+ SELECT metric WHERE date1_label < date2_label
15
+ SELECT metric WHERE attribute = attribute_value
16
+ SELECT metric WHERE attribute <> attribute_value
17
+ SELECT metric WHERE label IN (label_value1, label_value2)
18
+ SELECT metric WHERE label NOT IN (label_value1, label_value2)
19
+ SELECT metric WHERE fact BETWEEN number AND number
20
+ SELECT metric WHERE date_label BETWEEN date_value1 AND date_value2
21
+ SELECT metric WHERE fact NOT BETWEEN number AND metric
22
+ SELECT metric WHERE attribute = NULL
23
+ SELECT metric WHERE attribute <> NULL
24
+ SELECT metric WHERE label IN (label_value1, label_value2, NULL)
25
+ SELECT metric WHERE label NOT IN (label_value1, label_value2, NULL)
26
+ \`\`\`
27
+
28
+ ## Examples
29
+
30
+ \`\`\`
31
+ SELECT {metric/number of transactions} WHERE {metric/total_amount} > 10000
32
+ SELECT {metric/number_of_transactions} WHERE {metric/amount} > 6 AND {metric/amount} <= 20
33
+ SELECT {metric/profit} WHERE {label/date_ordered.monthYear} < "2007-05"
34
+ SELECT {metric/profit} WHERE {label/date_ordered.year} > "2007"
35
+ SELECT {metric/profit} WHERE {label/date_ordered.date} <= "2010-12-22"
36
+ SELECT {metric/profit} WHERE {label/date_ordered.week} < {label/date_shipped.week}
37
+ SELECT {metric/payment} WHERE {label/country} = "US"
38
+ SELECT {metric/payment} WHERE {label/date_ordered.week} = {label/date_shipped.week}
39
+ SELECT {metric/payment} WHERE {label/country} <> "US"
40
+ SELECT {metric/payment} WHERE {label/region} IN ("America", "EU")
41
+ SELECT {metric/payment} WHERE {label/region} NOT IN ("America", "EU")
42
+ SELECT {metric/payment} WHERE {label/date.quarter} BETWEEN THIS - 5 AND THIS
43
+ SELECT {metric/payment} WHERE {fact/cost} BETWEEN 100 AND 200
44
+ SELECT {metric/payment} WHERE {fact/cost} BETWEEN 100 AND {metric/highest_cost}
45
+ SELECT {metric/payment} WHERE {label/country} = NULL
46
+ SELECT {metric/payment} WHERE {label/country} <> NULL
47
+ SELECT {metric/payment} WHERE {label/region} IN ("America", "EU", NULL)
48
+ SELECT {metric/payment} WHERE {label/region} NOT IN ("America", "EU", NULL)
49
+ \`\`\`
50
+ >A comparison of attribute values with NULL using MAQL relational operators translates to semantics of \`\`IS NULL\`\`/ \`\`IS NOT NULL\`\` operators in SQL.`;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Rolling Window\nUse the ROWS BETWEEN keyword to specify a rolling window over which\nrunning total functions (for example RUNAVG) are computed.\n\nRunning total functions such as RUNSUM, RUNAVG, RUNMIN and RUNMAX can be\nspecified with rolling window or a shifted boundary. An example could be\na moving average used with time series data to smooth out short-term\nfluctuations and highlight longer-term trends or cycles.\n\nROWS BETWEEN does not currently support the COUNT or APPROXIMATE_COUNT function.\n\n## Syntax\n\n```\nSELECT (RUNNING TOTAL)(...) ROWS BETWEEN (...) AND (...)\nSELECT RUNAVG (...) ROWS BETWEEN (\u2026) AND (\u2026)\n```\n\n## Examples\n\n**In the context of Date**\n\nDefine a moving average\n\n```\nSELECT RUNAVG (Revenue) ROWS BETWEEN 5 PRECEDING AND CURRENT ROW\n```\n\nReturn Year-to-Date (YTD) for Revenue:\n\n```\nSELECT RUNSUM (Revenue) WITHIN Year (Opp. Close) ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n```\n\nDefine five days preceding and the current date:\n\n```\n SELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND CURRENT ROW\n```\n\n```\nSELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND 1 PRECEDING\nSELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND 1 FOLLOWING\n```\n\nDisplay year to date - the same result as without specifying ROWS BETWEEN statement:\n\n```\nSELECT RUNSUM({metric/m}) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n```\n\nDefine year to yesterday:\n\n```\nSELECT RUNSUM({metric}/m) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ROW\n```\n\n**In the context of Month**\n\nDefine the last twelve months:\n\n```\nSELECT RUNSUM({metric/m}) ROWS BETWEEN 13 PRECEDING AND 1 PRECEDING\n```\n\nDefine everything before the current month:\n\n```\n SELECT RUNAVG({metric/m}) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING\n```";
2
+ //# sourceMappingURL=rolling-window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolling-window.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/runing-totals/rolling-window.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,w1DAqEb,CAAC"}
@@ -0,0 +1,71 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Rolling Window
3
+ Use the ROWS BETWEEN keyword to specify a rolling window over which
4
+ running total functions (for example RUNAVG) are computed.
5
+
6
+ Running total functions such as RUNSUM, RUNAVG, RUNMIN and RUNMAX can be
7
+ specified with rolling window or a shifted boundary. An example could be
8
+ a moving average used with time series data to smooth out short-term
9
+ fluctuations and highlight longer-term trends or cycles.
10
+
11
+ ROWS BETWEEN does not currently support the COUNT or APPROXIMATE_COUNT function.
12
+
13
+ ## Syntax
14
+
15
+ \`\`\`
16
+ SELECT (RUNNING TOTAL)(...) ROWS BETWEEN (...) AND (...)
17
+ SELECT RUNAVG (...) ROWS BETWEEN (…) AND (…)
18
+ \`\`\`
19
+
20
+ ## Examples
21
+
22
+ **In the context of Date**
23
+
24
+ Define a moving average
25
+
26
+ \`\`\`
27
+ SELECT RUNAVG (Revenue) ROWS BETWEEN 5 PRECEDING AND CURRENT ROW
28
+ \`\`\`
29
+
30
+ Return Year-to-Date (YTD) for Revenue:
31
+
32
+ \`\`\`
33
+ SELECT RUNSUM (Revenue) WITHIN Year (Opp. Close) ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
34
+ \`\`\`
35
+
36
+ Define five days preceding and the current date:
37
+
38
+ \`\`\`
39
+ SELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND CURRENT ROW
40
+ \`\`\`
41
+
42
+ \`\`\`
43
+ SELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND 1 PRECEDING
44
+ SELECT RUNAVG({metric}) ROWS BETWEEN 5 PRECEDING AND 1 FOLLOWING
45
+ \`\`\`
46
+
47
+ Display year to date - the same result as without specifying ROWS BETWEEN statement:
48
+
49
+ \`\`\`
50
+ SELECT RUNSUM({metric/m}) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
51
+ \`\`\`
52
+
53
+ Define year to yesterday:
54
+
55
+ \`\`\`
56
+ SELECT RUNSUM({metric}/m) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ROW
57
+ \`\`\`
58
+
59
+ **In the context of Month**
60
+
61
+ Define the last twelve months:
62
+
63
+ \`\`\`
64
+ SELECT RUNSUM({metric/m}) ROWS BETWEEN 13 PRECEDING AND 1 PRECEDING
65
+ \`\`\`
66
+
67
+ Define everything before the current month:
68
+
69
+ \`\`\`
70
+ SELECT RUNAVG({metric/m}) WITHIN {attribute/year} ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING
71
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Running Total Statistical Functions\nRunning Total Statistical Functions calculate the standard deviation or\nvariance using all values up to the current date for a fact or metric.\nFunctions are available for standard deviation, variance, and versions\nof those functions for populations. See [Standard Deviation Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/standard-deviation-functions/) and [Variance Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/variance-functions/).\n\nSuppose you are tracking daily production for your enterprise throughout\nthe month in a simple visualization tracking daily Units. You can use the\nRUNAVG and RUNSTDEV statistical functions to track the reliability of\nestimates as the month begins to close:\n\n\n| Date | Units | Running Avg Daily Units | Running StDev |\n| ------------ | ------- | ------------------------- | --------------- |\n| 06/02/2014| 50| 50.00| (blank value) |\n| 06/03/2014| 60| 55.00| 7.07 |\n| 06/04/2014| 70| 60.00| 10.00 |\n| 06/05/2014| 50| 57.50| 9.57 |\n| 06/06/2014| 60| 58.00| 8.37 |\n| 06/09/2014| 80| 61.67| 11.69 |\n| 06/10/2014| 50| 60.00| 11.55 |\n| 06/11/2014| 70| 61.25| 11.26 |\n| 06/12/2014| 60| 61.11| 10.54 |\n| 06/13/2014| 80| 63.00| 11.60 |\n\n\nRunning total metrics can be broken down by two or more date attributes\nfrom the same date dimension. Non-date attributes are not supported.\n\n## Syntax\n\n```\nSELECT RUNSTDEV(...)\nSELECT RUNSTDEVP(...)\nSELECT RUNVAR(...)\nSELECT RUNVARP(...)\nSELECT RUNSTDEV(...) WITHIN (...)\n```\n\nThe value for WITHIN must be a date attribute.\n\n```\nSELECT RUNSTDEV(...) WITHIN (ALL OTHER)\n```\n\n## Examples\n\n```\nSELECT RUNVAR({fact/sales})\nSELECT RUNSTDEVP({metric/leads}) WHERE {label/date_ordered.year} = THIS\nSELECT RUNVARP({metric/returns}) WHERE {metric/amount} > 500000\nSELECT RUNSTDEV({metric/opportunities}) WITHIN ({label/date_ordered.quarter_year})\n```";
2
+ //# sourceMappingURL=running-total-statistical-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"running-total-statistical-functions.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/runing-totals/running-total-statistical-functions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,s/DAoDb,CAAC"}
@@ -0,0 +1,54 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Running Total Statistical Functions
3
+ Running Total Statistical Functions calculate the standard deviation or
4
+ variance using all values up to the current date for a fact or metric.
5
+ Functions are available for standard deviation, variance, and versions
6
+ of those functions for populations. See [Standard Deviation Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/standard-deviation-functions/) and [Variance Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/variance-functions/).
7
+
8
+ Suppose you are tracking daily production for your enterprise throughout
9
+ the month in a simple visualization tracking daily Units. You can use the
10
+ RUNAVG and RUNSTDEV statistical functions to track the reliability of
11
+ estimates as the month begins to close:
12
+
13
+
14
+ | Date | Units | Running Avg Daily Units | Running StDev |
15
+ | ------------ | ------- | ------------------------- | --------------- |
16
+ | 06/02/2014| 50| 50.00| (blank value) |
17
+ | 06/03/2014| 60| 55.00| 7.07 |
18
+ | 06/04/2014| 70| 60.00| 10.00 |
19
+ | 06/05/2014| 50| 57.50| 9.57 |
20
+ | 06/06/2014| 60| 58.00| 8.37 |
21
+ | 06/09/2014| 80| 61.67| 11.69 |
22
+ | 06/10/2014| 50| 60.00| 11.55 |
23
+ | 06/11/2014| 70| 61.25| 11.26 |
24
+ | 06/12/2014| 60| 61.11| 10.54 |
25
+ | 06/13/2014| 80| 63.00| 11.60 |
26
+
27
+
28
+ Running total metrics can be broken down by two or more date attributes
29
+ from the same date dimension. Non-date attributes are not supported.
30
+
31
+ ## Syntax
32
+
33
+ \`\`\`
34
+ SELECT RUNSTDEV(...)
35
+ SELECT RUNSTDEVP(...)
36
+ SELECT RUNVAR(...)
37
+ SELECT RUNVARP(...)
38
+ SELECT RUNSTDEV(...) WITHIN (...)
39
+ \`\`\`
40
+
41
+ The value for WITHIN must be a date attribute.
42
+
43
+ \`\`\`
44
+ SELECT RUNSTDEV(...) WITHIN (ALL OTHER)
45
+ \`\`\`
46
+
47
+ ## Examples
48
+
49
+ \`\`\`
50
+ SELECT RUNVAR({fact/sales})
51
+ SELECT RUNSTDEVP({metric/leads}) WHERE {label/date_ordered.year} = THIS
52
+ SELECT RUNVARP({metric/returns}) WHERE {metric/amount} > 500000
53
+ SELECT RUNSTDEV({metric/opportunities}) WITHIN ({label/date_ordered.quarter_year})
54
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Running Totals for Core Functions\nRunning Totals for Core Functions take the running sum, average,\nminimum, or maximum of a project fact or metric. In a table broken down\nby a date attribute, the running total value on any given day would be\ncalculated by aggregating values from all prior days along with that of\nthe current day.\n\nRunning total metrics can be broken down by two or more date attributes\nfrom the same date dimension. Non-date attributes are not supported.\n\n## Syntax\n\n```\nSELECT RUNSUM(...)\nSELECT RUNAVG(...)\nSELECT RUNMIN(...)\nSELECT RUNMAX(...)\nSELECT RUNSUM(...) WITHIN (...)\n```\n\nThe value for WITHIN must be a date attribute.\n\n```\nSELECT RUNSUM(...) WITHIN (ALL OTHER)\n```\n\n## Examples\n\n```\nSELECT RUNSUM({fact/sales})\nSELECT RUNSUM({fact/sales}) WITHIN({label/date.week})\nSELECT RUNSUM({fact/sales}) WITHIN({label/date.week}) BY {label/date}, {attribute/region}\nSELECT RUNMIN({fact/probability}) WHERE {label/date.year} = THIS AND {metric/amount} > 500000\nSELECT RUNMAX({fact/opportunity}) BY {label/date.quarter_year}\nSELECT RUNMAX({fact/sales}) WITHIN ({label/date.year}) WITHOUT PARENT FILTER\n```";
2
+ //# sourceMappingURL=running-totals-for-core-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"running-totals-for-core-functions.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/runing-totals/running-totals-for-core-functions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,6oCAmCb,CAAC"}
@@ -0,0 +1,37 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Running Totals for Core Functions
3
+ Running Totals for Core Functions take the running sum, average,
4
+ minimum, or maximum of a project fact or metric. In a table broken down
5
+ by a date attribute, the running total value on any given day would be
6
+ calculated by aggregating values from all prior days along with that of
7
+ the current day.
8
+
9
+ Running total metrics can be broken down by two or more date attributes
10
+ from the same date dimension. Non-date attributes are not supported.
11
+
12
+ ## Syntax
13
+
14
+ \`\`\`
15
+ SELECT RUNSUM(...)
16
+ SELECT RUNAVG(...)
17
+ SELECT RUNMIN(...)
18
+ SELECT RUNMAX(...)
19
+ SELECT RUNSUM(...) WITHIN (...)
20
+ \`\`\`
21
+
22
+ The value for WITHIN must be a date attribute.
23
+
24
+ \`\`\`
25
+ SELECT RUNSUM(...) WITHIN (ALL OTHER)
26
+ \`\`\`
27
+
28
+ ## Examples
29
+
30
+ \`\`\`
31
+ SELECT RUNSUM({fact/sales})
32
+ SELECT RUNSUM({fact/sales}) WITHIN({label/date.week})
33
+ SELECT RUNSUM({fact/sales}) WITHIN({label/date.week}) BY {label/date}, {attribute/region}
34
+ SELECT RUNMIN({fact/probability}) WHERE {label/date.year} = THIS AND {metric/amount} > 500000
35
+ SELECT RUNMAX({fact/opportunity}) BY {label/date.quarter_year}
36
+ SELECT RUNMAX({fact/sales}) WITHIN ({label/date.year}) WITHOUT PARENT FILTER
37
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# CORREL\nCorrelation indicates the degree of association between two sets of\nvalues. The CORREL function returns correlation coefficient that varies\nbetween -1 and 1.\n\n- A value of 1 indicates that as X increases, Y always increases.\n- A value of -1 indicates that as X increases, Y always decreases.\n- A value of 0 indicates that there is no correlation; values for X\n cannot be used as predictors for values of Y.\n\nCorrelation coefficient is measured by calculating the covariance of the\ntwo sets of values, which measures how they vary with each other. This\nmeasure is then divided by the product of the standard deviations of\neach set of values. See [Covariance Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/covariance-functions/) and [Standard Deviation Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/standard-deviation-functions/).\n\nCorrelation coefficient is a component calculation of the Least-Squares\nmethod of linear regression. See [Least-Squares Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/least-squares-functions/).\n\nCORREL function has the form `CORREL (numeric1,numeric2)` where\n*numeric1* and *numeric2* are facts or metrics.\n\n![Equation - Correlation Coefficient](https://www.gooddata.com/developers/cloud-native/doc/maql/correl.png)\n\nWhen this equation is broken down into its component parts, it becomes\nthe following:\n\n![Equation - Correlation Coefficient decomposed](https://www.gooddata.com/developers/cloud-native/doc/maql/correl-coef.png)\n\nFor CORREL to work, metrics and facts must be associated with the same\ndataset or the same level of granularity.\n\n## Syntax\n\n```\nSELECT CORREL(\u2026)\nSELECT CORREL(metric1, metric2)\nSELECT CORREL(metric1, fact2)\nSELECT CORREL(fact1, fact2)\n```\n\n## Examples\n\n```\nSELECT CORREL({metric/production_volume}, {metric/rate_of_defects})\nSELECT CORREL({metric/gross_tonnage}, {metric/gross_profit})\n```";
2
+ //# sourceMappingURL=correl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correl.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/statistic/correl.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,qiEA6Cb,CAAC"}
@@ -0,0 +1,47 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# CORREL
3
+ Correlation indicates the degree of association between two sets of
4
+ values. The CORREL function returns correlation coefficient that varies
5
+ between -1 and 1.
6
+
7
+ - A value of 1 indicates that as X increases, Y always increases.
8
+ - A value of -1 indicates that as X increases, Y always decreases.
9
+ - A value of 0 indicates that there is no correlation; values for X
10
+ cannot be used as predictors for values of Y.
11
+
12
+ Correlation coefficient is measured by calculating the covariance of the
13
+ two sets of values, which measures how they vary with each other. This
14
+ measure is then divided by the product of the standard deviations of
15
+ each set of values. See [Covariance Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/covariance-functions/) and [Standard Deviation Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/standard-deviation-functions/).
16
+
17
+ Correlation coefficient is a component calculation of the Least-Squares
18
+ method of linear regression. See [Least-Squares Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/least-squares-functions/).
19
+
20
+ CORREL function has the form \`CORREL (numeric1,numeric2)\` where
21
+ *numeric1* and *numeric2* are facts or metrics.
22
+
23
+ ![Equation - Correlation Coefficient](https://www.gooddata.com/developers/cloud-native/doc/maql/correl.png)
24
+
25
+ When this equation is broken down into its component parts, it becomes
26
+ the following:
27
+
28
+ ![Equation - Correlation Coefficient decomposed](https://www.gooddata.com/developers/cloud-native/doc/maql/correl-coef.png)
29
+
30
+ For CORREL to work, metrics and facts must be associated with the same
31
+ dataset or the same level of granularity.
32
+
33
+ ## Syntax
34
+
35
+ \`\`\`
36
+ SELECT CORREL(…)
37
+ SELECT CORREL(metric1, metric2)
38
+ SELECT CORREL(metric1, fact2)
39
+ SELECT CORREL(fact1, fact2)
40
+ \`\`\`
41
+
42
+ ## Examples
43
+
44
+ \`\`\`
45
+ SELECT CORREL({metric/production_volume}, {metric/rate_of_defects})
46
+ SELECT CORREL({metric/gross_tonnage}, {metric/gross_profit})
47
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Covariance Functions\nCovariance functions return the statistical covariance - how much two\nsets of values change together based on a sample of the population\n(COVAR), or based on a biased population (COVARP).\n\nCovariance measures how two sets of values vary together. This\nelementary function is used as a building block for some of the\ntwo-dimensional statistical functions used in linear regression, as it\ndescribes collectively how the two sets of values vary around their mean\nvalues.\n\n- `COVAR (*numeric1*, *numeric2*)`\n\n ![Equation -Covariance](https://www.gooddata.com/developers/cloud-native/doc/maql/covar.png)\n\n - where *numeric1* and *numeric2* are facts or metrics\n - Computes the product of variance from mean for each value of *x* and *y*. These values are summed and then divided by *n*.\n - Use for sets of values that are only a sample of the total (biased) population.\n\n- `COVARP (*numeric1*, *numeric2*)`\n\n ![Equation - Covariance for Populations](https://www.gooddata.com/developers/cloud-native/doc/maql/covarp.png)\n\n - where *numeric1* and *numeric2* are facts or metrics\n - Use COVARP for calculating covariances when the numeric values are the entire population of values.\n - Use for sets of values that include the entire (unbiased) population, use COVARP.\n\n## Syntax\n\n```\nSELECT COVAR(\u2026)\nSELECT COVAR(metric1, metric2)\nSELECT COVAR(fact1, metric2)\nSELECT COVAR(fact1, fact2)\nSELECT COVARP(metric1, metric2)\nSELECT COVARP(fact1, metric2)\nSELECT COVARP(fact1, fact2)\n```\n\n## Examples\n\n```\nSELECT COVAR({metric/total_cost_of_inputs}, {metric/gross_margin})\nSELECT COVARP({fact/height}, {fact/height})\n```";
2
+ //# sourceMappingURL=covariance-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"covariance-functions.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/statistic/covariance-functions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,0rDA4Cb,CAAC"}
@@ -0,0 +1,46 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Covariance Functions
3
+ Covariance functions return the statistical covariance - how much two
4
+ sets of values change together based on a sample of the population
5
+ (COVAR), or based on a biased population (COVARP).
6
+
7
+ Covariance measures how two sets of values vary together. This
8
+ elementary function is used as a building block for some of the
9
+ two-dimensional statistical functions used in linear regression, as it
10
+ describes collectively how the two sets of values vary around their mean
11
+ values.
12
+
13
+ - \`COVAR (*numeric1*, *numeric2*)\`
14
+
15
+ ![Equation -Covariance](https://www.gooddata.com/developers/cloud-native/doc/maql/covar.png)
16
+
17
+ - where *numeric1* and *numeric2* are facts or metrics
18
+ - Computes the product of variance from mean for each value of *x* and *y*. These values are summed and then divided by *n*.
19
+ - Use for sets of values that are only a sample of the total (biased) population.
20
+
21
+ - \`COVARP (*numeric1*, *numeric2*)\`
22
+
23
+ ![Equation - Covariance for Populations](https://www.gooddata.com/developers/cloud-native/doc/maql/covarp.png)
24
+
25
+ - where *numeric1* and *numeric2* are facts or metrics
26
+ - Use COVARP for calculating covariances when the numeric values are the entire population of values.
27
+ - Use for sets of values that include the entire (unbiased) population, use COVARP.
28
+
29
+ ## Syntax
30
+
31
+ \`\`\`
32
+ SELECT COVAR(…)
33
+ SELECT COVAR(metric1, metric2)
34
+ SELECT COVAR(fact1, metric2)
35
+ SELECT COVAR(fact1, fact2)
36
+ SELECT COVARP(metric1, metric2)
37
+ SELECT COVARP(fact1, metric2)
38
+ SELECT COVARP(fact1, fact2)
39
+ \`\`\`
40
+
41
+ ## Examples
42
+
43
+ \`\`\`
44
+ SELECT COVAR({metric/total_cost_of_inputs}, {metric/gross_margin})
45
+ SELECT COVARP({fact/height}, {fact/height})
46
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# FORECAST - Adding a Trend Line\nFORECAST functions returns linear regression estimates for up to 10\nfuture periods based on existing data. Second parameter is the number of\nperiods; the default is 3.\n\nUse the FORECAST function to add a trend line to a visualization. A trend\nline uses linear regression to predict future periods based on the existing\ndata. For example, you could use a trend line to predict future sales\nbased on your historical data. Forecast visualizations must have one date/time\nattribute on the X axis, and no other attributes.\n\n![forecast function](https://www.gooddata.com/developers/cloud-native/doc/maql/forecast.png)\n\n## Syntax\n\n```\nSELECT FORECAST(... [, number of periods])\n```\n\nOptionally, you can specify a number of periods to forecast.\n\n**Format:** number\n\n**Default:** 3\n\nAll visualization filters are applied to the metric that you FORECAST except\nfor date and time filters. To apply a date or time filter to the visualization,\nadd it directly to the metric. For example:\n\n```\nSELECT FORECAST((SELECT COUNT({attribute/activity}) WHERE {label/date.year} = \"2012\"), 6)\n```\n\n## Examples\n\n```\nSELECT FORECAST(SUM({fact/quantity}) , 6)\n```\n\nSuppose you create a forecast for the totals of `Deal Size` fact sliced\nby the `Month (Sale Closed)` attribute. Use the following metric to\ncompute the next three months based on all historical data:\n\n```\nSELECT FORECAST(SUM({metric/deal_size}))\n```\n\nThe following metric predicts Deal Size for the next six months:\n\n```\nSELECT FORECAST(SUM({metric/deal_size}), 6)\n```\n\nThe following metric predicts Deal Size for the next two months using data from\nthe previous year:\n\n```\nSELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.year} = PREVIOUS), 2)\n```\n\nThe following metric predicts Deal Size for the next two months using data from\nthe previous and current years:\n\n```\nSELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.year} = PREVIOUS OR {label/date.year} = THIS), 2)\n```\n\nThe following metric predicts Deal Size for the next four months using data from\nthe last twelve months:\n\n```\nSELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.month_year} >= THIS-12), 4)\n```";
2
+ //# sourceMappingURL=forecast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forecast.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/statistic/forecast.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,utEAwEb,CAAC"}
@@ -0,0 +1,74 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ export const content = `# FORECAST - Adding a Trend Line
3
+ FORECAST functions returns linear regression estimates for up to 10
4
+ future periods based on existing data. Second parameter is the number of
5
+ periods; the default is 3.
6
+
7
+ Use the FORECAST function to add a trend line to a visualization. A trend
8
+ line uses linear regression to predict future periods based on the existing
9
+ data. For example, you could use a trend line to predict future sales
10
+ based on your historical data. Forecast visualizations must have one date/time
11
+ attribute on the X axis, and no other attributes.
12
+
13
+ ![forecast function](https://www.gooddata.com/developers/cloud-native/doc/maql/forecast.png)
14
+
15
+ ## Syntax
16
+
17
+ \`\`\`
18
+ SELECT FORECAST(... [, number of periods])
19
+ \`\`\`
20
+
21
+ Optionally, you can specify a number of periods to forecast.
22
+
23
+ **Format:** number
24
+
25
+ **Default:** 3
26
+
27
+ All visualization filters are applied to the metric that you FORECAST except
28
+ for date and time filters. To apply a date or time filter to the visualization,
29
+ add it directly to the metric. For example:
30
+
31
+ \`\`\`
32
+ SELECT FORECAST((SELECT COUNT({attribute/activity}) WHERE {label/date.year} = "2012"), 6)
33
+ \`\`\`
34
+
35
+ ## Examples
36
+
37
+ \`\`\`
38
+ SELECT FORECAST(SUM({fact/quantity}) , 6)
39
+ \`\`\`
40
+
41
+ Suppose you create a forecast for the totals of \`Deal Size\` fact sliced
42
+ by the \`Month (Sale Closed)\` attribute. Use the following metric to
43
+ compute the next three months based on all historical data:
44
+
45
+ \`\`\`
46
+ SELECT FORECAST(SUM({metric/deal_size}))
47
+ \`\`\`
48
+
49
+ The following metric predicts Deal Size for the next six months:
50
+
51
+ \`\`\`
52
+ SELECT FORECAST(SUM({metric/deal_size}), 6)
53
+ \`\`\`
54
+
55
+ The following metric predicts Deal Size for the next two months using data from
56
+ the previous year:
57
+
58
+ \`\`\`
59
+ SELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.year} = PREVIOUS), 2)
60
+ \`\`\`
61
+
62
+ The following metric predicts Deal Size for the next two months using data from
63
+ the previous and current years:
64
+
65
+ \`\`\`
66
+ SELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.year} = PREVIOUS OR {label/date.year} = THIS), 2)
67
+ \`\`\`
68
+
69
+ The following metric predicts Deal Size for the next four months using data from
70
+ the last twelve months:
71
+
72
+ \`\`\`
73
+ SELECT FORECAST((SELECT SUM({metric/deal_size}) WHERE {label/date.month_year} >= THIS-12), 4)
74
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Least-Squares Functions\nThe **least-squares method** of linear regression attempts to fit a\nlinear regression trend line as closely as possible. This line has the\nsmallest possible value for the sum of the squares of the errors between\nthe predicted value of the line and the actual two-dimensional data\npoints.\n\nIn the following diagram, the least-squares linear regression plots a\nline through the set of points that minimizes the sum of the squares of\nthe error factors.\n\n![Least-Squares linear regression diagram](https://www.gooddata.com/developers/cloud-native/doc/maql/least-squares-linear-regression.png)\n\nThe actual data points are calculated using the following equation:\n\n![Least-squares data points](https://www.gooddata.com/developers/cloud-native/doc/maql/least-squares-data-points.png)\n\nUse the R-squared function (RSQ) that returns square of the correlation\ncoefficient to measure how well the linear regression expresses the\nvariability of the Y values around their mean.\n\n- `RSQ (*numeric1*, *numeric2*)`\n - where *numeric1* and *numeric2* are facts or metrics\n - Computes the R-squared value for the two sets of numeric values.\n Also known as the **coefficient of determination**, R-squared\n ranges between 0 and 1, with a value of 1 indicating that the\n model explains all variability in the dependent variables data.\n\n R-squared does not determine if there is bias in the estimates.\n\n## Syntax\n\n```\nSELECT RSQ(metric1, metric2)\nSELECT RSQ(fact1, metric2)\nSELECT RSQ(fact1, fact2)\n```\n\n## Examples\n\n```\nSELECT RSQ({metric/count_of_defects}, {metric/production_volume})\n```";
2
+ //# sourceMappingURL=least-squares-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"least-squares-functions.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/statistic/least-squares-functions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,ipDA0Cb,CAAC"}
@@ -0,0 +1,44 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ export const content = `# Least-Squares Functions
3
+ The **least-squares method** of linear regression attempts to fit a
4
+ linear regression trend line as closely as possible. This line has the
5
+ smallest possible value for the sum of the squares of the errors between
6
+ the predicted value of the line and the actual two-dimensional data
7
+ points.
8
+
9
+ In the following diagram, the least-squares linear regression plots a
10
+ line through the set of points that minimizes the sum of the squares of
11
+ the error factors.
12
+
13
+ ![Least-Squares linear regression diagram](https://www.gooddata.com/developers/cloud-native/doc/maql/least-squares-linear-regression.png)
14
+
15
+ The actual data points are calculated using the following equation:
16
+
17
+ ![Least-squares data points](https://www.gooddata.com/developers/cloud-native/doc/maql/least-squares-data-points.png)
18
+
19
+ Use the R-squared function (RSQ) that returns square of the correlation
20
+ coefficient to measure how well the linear regression expresses the
21
+ variability of the Y values around their mean.
22
+
23
+ - \`RSQ (*numeric1*, *numeric2*)\`
24
+ - where *numeric1* and *numeric2* are facts or metrics
25
+ - Computes the R-squared value for the two sets of numeric values.
26
+ Also known as the **coefficient of determination**, R-squared
27
+ ranges between 0 and 1, with a value of 1 indicating that the
28
+ model explains all variability in the dependent variables data.
29
+
30
+ R-squared does not determine if there is bias in the estimates.
31
+
32
+ ## Syntax
33
+
34
+ \`\`\`
35
+ SELECT RSQ(metric1, metric2)
36
+ SELECT RSQ(fact1, metric2)
37
+ SELECT RSQ(fact1, fact2)
38
+ \`\`\`
39
+
40
+ ## Examples
41
+
42
+ \`\`\`
43
+ SELECT RSQ({metric/count_of_defects}, {metric/production_volume})
44
+ \`\`\``;
@@ -0,0 +1,2 @@
1
+ export declare const content = "# Standard Deviation Functions\nStandard deviation function return the statistical standard deviation of\nall values in the set based on a sample of the population (STDEV), or\nbased on a biased population (STDEVP).\n\nStandard deviation is useful for measuring variance within a data set\nand, in application, confidence in statistical results. For example, in\nfinance, standard deviation can measure the potential deviation from\nexpected return rate, measuring the volatility of the investment.\nDepending on the number of values in the sample set, you should use\neither of the following metrics.\n\n- `STDEV (*numeric*)`, also known as the **corrected standard deviation**\n\n ![Equation - Standard Deviation](https://www.gooddata.com/developers/cloud-native/doc/maql/stdev.png)\n - where *numeric* is a fact or metric\n - Computes the sum of squared differences from the mean for *n*\n values divided by a sample size factor. If the input values are\n a sample of the total (biased) population, the divisor is *(n -\n 1)* sample size, which is used in the STDEV function.\n\n - This value is the **variance**. See [Variance Functions](https://www.gooddata.com/developers/cloud-native/doc/hosted/create-metrics/maql/statistic/variance-functions/). The square root of the above value represents the standard deviation.\n\n If individual values are used as inputs, STDEV, generates a null\n value. In these cases, use STDEVP instead.\n\n- `STDEVP (*numeric*)`, also known as the **uncorrected standard deviation**.\n\n ![Equation - Standard Deviation for Populations](https://www.gooddata.com/developers/cloud-native/doc/maql/stdevp.png )\n\n - where *numeric* is a fact or metric\n - Computes square root of the sum of squared differences from the mean for *n* values divided by *n*\n - Use STDEVP for calculating standard deviations if the input set\n contains the entire (unbiased) population of values. The\n deviation for a single value is zero.\n\n## Syntax\n\n```\nSELECT STDEV(\u2026)\nSELECT STDEV(metric)\nSELECT STDEVP(fact)\n```\n\n## Examples\n\n```\nSELECT STDEV({metric/internal_rate_of_return})\nSELECT STDEVP({metric/gross_weight})\n```\n\n## Using Standard Deviation\n\nYou can use standard deviation to create ranges as other metrics.\nSuppose you have a standard deviation metric (StDev Transaction Amt):\n\n### Example 1: +1 Std.\n\n```\nSELECT {metric/avg_transaction_amt} + {metric/stdev_transaction_amt}\n```\n\n### Example 2: +2 Std.\n\n```\nSELECT {metric/avg_transaction_amt} + ({metric/stdev_transaction_amt} * 2)\n```\n\n### Example 3: -1 Std.\n\n```\nSELECT {metric/avg_transaction_amt} + ({metric/stdev_transaction_amt} * -1)\n```\n\n### Example 4: -2 Std.\n\n```\nSELECT {metric/avg_transaction_amt} + ({metric/stdev_transaction_amt} * -2)\n```\n\n### Sample Chart\n\nUsing the examples above, you can create a combo chart that shows all\nindividual transactions (X axis) and where they fall within bands of\n+2/-2 standard deviations (Y axis).\n\n![Transaction amounts compared to standard deviations](https://www.gooddata.com/developers/cloud-native/doc/maql/stdev-transaction-accounts.png)";
2
+ //# sourceMappingURL=standard-deviation-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-deviation-functions.d.ts","sourceRoot":"","sources":["../../../../../../../src/docs/en/docs/create-metrics/maql/statistic/standard-deviation-functions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,spGAsF6H,CAAC"}