curl -i -H "Accept: application/json; q=1.0, */*; q=0.1" "https://zero-ninja.getcourse.ru/pl/api/users" -d "action=add&key={secret_key}¶ms={params}"
HTTP/2 200
server: nginx/1.20.1
date: Fri, 09 Sep 2022 21:05:08 GMT
content-type: application/json; charset=UTF-8
set-cookie: PHPSESSID5=f754b2ead20ce1842251abac5e383516; expires=Mon, 10-Oct-2022 21:05:08 GMT; Max-Age=2678400; path=/;Priority=High; domain=zero-ninja.getcourse.ru; HttpOnly
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
x-frame-options: DENY
server-version: 18
set-cookie: dd_bdfhyr=083f8fe6f3db3b15e15625cf4bae4418; expires=Sat, 10-Sep-2022 21:05:08 GMT; Max-Age=86400; path=/; secure; HttpOnly
x-xss-protection: 1
{"success":false,"error":"Неавторизованное API-обращение","trace":"#0 [internal function]: app\\modules\\api\\controllers\\ApiJsonController->actionIndex()\n#1 /home/deploy/www/prod/releases/1/new/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)\n#2 /home/deploy/www/prod/releases/1/new/vendor/yiisoft/yii2/base/Controller.php(151): yii\\base\\InlineAction->runWithParams(Array)\n#3 /home/deploy/www/prod/releases/1/new/vendor/yiisoft/yii2/base/Module.php(455): yii\\base\\Controller->runAction('', Array)\n#4 /home/deploy/www/prod/releases/1/new/vendor/yiisoft/yii2/web/Application.php(84): yii\\base\\Module->runAction('api/users', Array)\n#5 /home/deploy/www/prod/releases/1/new/components/web/Application.php(121): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))\n#6 /home/deploy/www/prod/releases/1/new/vendor/yiisoft/yii2/base/Application.php(375): app\\components\\web\\Application->handleRequest(Object(yii\\web\\Request))\n#7 /home/deploy/www/prod/releases/1/new/web/getcourse.php(37): yii\\base\\Application->run()\n#8 {main}"}
with temp as (
SELECT id from ams_cs_request_history
where "STATUS_ID" in (17,18,20,21,22,23)
and "DATE" > '2022-08-01'::date
and "DATE" < '2022-09-01'::date
) select
"STATUS_ID",
count(*) as CNT,
to_char("DATE",'YYYY-MM-DD') as DatePartChar
from temp
where "STATUS_ID" in (17,18,20,21,22,23) and id in (select id from temp)
group by "STATUS_ID", DatePartChar
limit 100;