adaptive-learning / anatomy

An intelligent application for practicing human anatomy.
https://practiceanatomy.com/
19 stars 6 forks source link

Usage stats #67

Open papousek opened 7 years ago

papousek commented 7 years ago
SELECT MONTH,
       count(user_id) AS users,
       avg(answers) AS answers_avg,
       avg(sessions) AS sessions_avg,
       avg(registered::int) AS registered
FROM
  (SELECT date_trunc('month', TIME) AS MONTH,
          a.user_id AS user_id,
          count(1) AS answers,
          count(distinct(session_id)) AS sessions,
          COALESCE(l.user_id, -1) < 0 AS registered
   FROM proso_models_answer AS a
   LEFT JOIN lazysignup_lazyuser AS l ON l.user_id = a.user_id
   GROUP BY 1,
            2,
            l.user_id) AS t
GROUP BY 1
ORDER BY 1 DESC;

From Practice Anatomy:

         month          | users |     answers_avg     |    sessions_avg    |       registered       
------------------------+-------+---------------------+--------------------+------------------------
 2017-02-01 00:00:00+01 |   991 | 37.1311806256306761 | 1.4349142280524723 | 0.12916246215943491423
 2017-01-01 00:00:00+01 |  1901 | 33.4413466596528143 | 1.4061020515518148 | 0.09047869542346133614
 2016-12-01 00:00:00+01 |  1540 | 43.3818181818181818 | 1.6240259740259740 | 0.15129870129870129870
 2016-11-01 00:00:00+01 |  2356 | 65.0284380305602716 | 2.0449915110356537 | 0.17275042444821731749
 2016-10-01 00:00:00+02 |  3003 | 57.6879786879786880 | 1.8761238761238761 | 0.15551115551115551116
 2016-09-01 00:00:00+02 |  1117 | 44.4261414503133393 | 1.6034019695613250 | 0.15398388540734109221
 2016-08-01 00:00:00+02 |   883 | 69.2944507361268403 | 1.8799546998867497 | 0.13590033975084937712
 2016-07-01 00:00:00+02 |   912 | 42.6776315789473684 | 1.6348684210526316 | 0.10855263157894736842
 2016-06-01 00:00:00+02 |  1380 | 59.9202898550724638 | 1.8050724637681159 | 0.13333333333333333333
 2016-05-01 00:00:00+02 |  1338 | 53.1188340807174888 | 1.7907324364723468 | 0.17189835575485799701
 2016-04-01 00:00:00+02 |  1364 | 55.6759530791788856 | 1.9054252199413490 | 0.13929618768328445748
 2016-03-01 00:00:00+01 |  1869 | 46.0428036383092563 | 1.5885500267522739 | 0.12092027822364901017
 2016-02-01 00:00:00+01 |  1083 | 62.1357340720221607 | 1.8162511542012927 | 0.15789473684210526316
 2016-01-01 00:00:00+01 |  1423 | 75.5411103302881237 | 2.0857343640196767 | 0.16584680252986647927
 2015-12-01 00:00:00+01 |  2383 | 62.1762484263533361 | 1.7855644146034410 | 0.13386487620646244230
 2015-11-01 00:00:00+01 |  1535 | 73.7713355048859935 | 2.0338762214983713 | 0.11009771986970684039
 2015-10-01 00:00:00+02 |   533 | 38.6735459662288931 | 1.5497185741088180 | 0.05628517823639774859
 2015-09-01 00:00:00+02 |    32 |  9.7812500000000000 | 1.5625000000000000 | 0.25000000000000000000
 2015-08-01 00:00:00+02 |    23 | 30.3043478260869565 | 3.1739130434782609 | 0.08695652173913043478

From Outline Maps (for comparison):

         month          | users |     answers_avg      |      sessions_avg      |       registered       
------------------------+-------+----------------------+------------------------+------------------------
 2017-02-01 00:00:00+01 | 14496 |  96.3554083885209713 |     1.6014072847682119 | 0.03256070640176600442
 2017-01-01 00:00:00+01 | 26177 | 105.7590250983687970 |     1.7127631126561485 | 0.03197463422088092600
 2016-12-01 00:00:00+01 | 20417 | 105.4757310084733310 |     1.7103884018220111 | 0.03384434539844247441
 2016-11-01 00:00:00+01 | 28417 |  96.8542421789773727 |     1.6751944258718373 | 0.03343069289509800472
 2016-10-01 00:00:00+02 | 24080 |  94.5701411960132890 |     1.6395764119601329 | 0.03276578073089700997
 2016-09-01 00:00:00+02 | 14992 |  95.2085112059765208 |     1.6862993596584845 | 0.03248399146211312700
 2016-08-01 00:00:00+02 |  4068 | 117.8384955752212389 |     1.8738938053097345 | 0.04941002949852507375
 2016-07-01 00:00:00+02 |  3319 | 115.6429647484181983 |     1.7484181982524857 | 0.05393190720096414583
 2016-06-01 00:00:00+02 | 13391 | 105.0436113807781346 |     1.6289298782764543 | 0.03786125009334627735
 2016-05-01 00:00:00+02 | 17437 | 100.6076159889889316 |     1.6745999885301371 | 0.02901875322589895051
 2016-04-01 00:00:00+02 | 15872 |  96.0878906250000000 |     1.6610383064516129 | 0.02973790322580645161
 2016-03-01 00:00:00+01 | 15289 |  88.0463732094970240 |     1.6146903002158415 | 0.03074105566093269671
 2016-02-01 00:00:00+01 | 17438 |  90.7789884161027641 |     1.6016171579309554 | 0.02729670833811216883
 2016-01-01 00:00:00+01 | 17325 | 108.5791053391053391 |     1.7114574314574315 | 0.01396825396825396825
 2015-12-01 00:00:00+01 | 13939 |  88.6696319678599613 |     1.6198436042757730 | 0.01535260779108974819
 2015-11-01 00:00:00+01 | 16943 |  86.6075075252316591 |     1.6249778669657086 | 0.01351590627397745382
 2015-10-01 00:00:00+02 | 17285 |  76.7832803008388776 |     1.5065663870407868 | 0.01862886896152733584
 2015-09-01 00:00:00+02 |  8848 |  76.9718580470162749 |     1.5155967450271248 | 0.01797016274864376130
 2015-08-01 00:00:00+02 |  2512 |  86.9271496815286624 |     1.5943471337579618 | 0.02746815286624203822
 2015-07-01 00:00:00+02 |  2328 |  93.2895189003436426 |     1.5932130584192440 | 0.03049828178694158076
 2015-06-01 00:00:00+02 |  9174 | 107.9642467843906693 |     1.4953128406365816 | 0.01853063004142140833
 2015-05-01 00:00:00+02 | 11437 | 101.4676051412083588 | 1.53781586080265803970 | 0.01739966774503803445
 2015-04-01 00:00:00+02 | 10664 |  98.1805138784696174 | 1.47393098274568642161 | 0.01687921980495123781
 2015-03-01 00:00:00+01 | 10624 |  96.5416039156626506 | 1.44757153614457831325 | 0.01637801204819277108
 2015-02-01 00:00:00+01 |  8769 | 108.2807617744326605 |     1.4910480100353518 | 0.01790397992929638499
 2015-01-01 00:00:00+01 | 10465 | 120.6046822742474916 | 1.56254180602006688963 | 0.01796464405160057334
 2014-12-01 00:00:00+01 |  7919 | 102.1067053920949615 |     1.4626846824093951 | 0.03965147114534663468
 2014-11-01 00:00:00+01 |  9101 | 108.0172508515547742 |     1.4924733545764202 | 0.03450170310954840127
 2014-10-01 00:00:00+02 |  7628 | 104.0049816465652858 |     1.5850812794965915 | 0.04365495542737283692
 2014-09-01 00:00:00+02 |  4952 | 112.6096526655896607 |     1.5617932148626817 | 0.05149434571890145396
 2014-08-01 00:00:00+02 |  1466 | 105.8683492496589359 |     2.2223738062755798 | 0.04979536152796725784
 2014-07-01 00:00:00+02 |  1006 | 132.8906560636182903 |     1.6650099403578529 | 0.07057654075546719682
 2014-06-01 00:00:00+02 |  3202 | 111.8538413491567770 |     1.5443472829481574 | 0.03279200499687695191
 2014-05-01 00:00:00+02 |  3874 | 110.4091378420237481 |     1.5175529168817759 | 0.03613835828600929272
 2014-04-01 00:00:00+02 |  1764 | 111.0028344671201814 | 0.83616780045351473923 | 0.07029478458049886621
 2014-03-01 00:00:00+01 |  2416 | 111.7119205298013245 | 0.00000000000000000000 | 0.05670529801324503311
 2014-02-01 00:00:00+01 |  1454 | 137.2365887207702889 | 0.00000000000000000000 | 0.08390646492434662999
 2014-01-01 00:00:00+01 |  1137 | 111.5690413368513632 | 0.00000000000000000000 | 0.06156552330694810906
 2013-12-01 00:00:00+01 |   277 | 139.6931407942238267 | 0.00000000000000000000 | 0.08664259927797833935
 2013-11-01 00:00:00+01 |   337 | 106.7299703264094955 | 0.00000000000000000000 | 0.07715133531157270030
 2013-10-01 00:00:00+02 |   129 |  91.0620155038759690 | 0.00000000000000000000 | 0.17829457364341085271
 2013-09-01 00:00:00+02 |    12 |  95.7500000000000000 | 0.00000000000000000000 | 0.50000000000000000000
 2013-08-01 00:00:00+02 |     5 | 178.2000000000000000 | 0.00000000000000000000 | 0.80000000000000000000
 2013-07-01 00:00:00+02 |     3 |  44.3333333333333333 | 0.00000000000000000000 | 1.00000000000000000000
 2013-06-01 00:00:00+02 |     2 |  11.5000000000000000 | 0.00000000000000000000 | 1.00000000000000000000