Skip to content

Commit

Permalink
docs: update docs for 4aabd90
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Aug 15, 2024
1 parent 79ca7ba commit 9bd623e
Show file tree
Hide file tree
Showing 14 changed files with 568 additions and 16 deletions.
2 changes: 1 addition & 1 deletion catalog.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ with
item_count,
subsection_block_id
)
select org, course_key, actor_id, subsection_block_id, engagement_level
select distinct org, course_key, actor_id, subsection_block_id, engagement_level
from subsection_counts
11 changes: 0 additions & 11 deletions compiled/aspects/tests/get_problem_id.sql

This file was deleted.

File renamed without changes.
348 changes: 348 additions & 0 deletions compiled/aspects/tests/macros/get_bucket.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,348 @@
select 0.95 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '90-100%'

union all

select 0.8 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '80-89%'

union all

select 0.700009 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '70-79%'

union all

select 0.69999 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '60-69%'

union all

select 0.5 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '50-59%'

union all

select 0.4123 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '40-49%'

union all

select 0.3000000000 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '30-39%'

union all

select 0.276734 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '20-29%'

union all

select 0.11111 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '10-19%'

union all

select 0.0342 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '0-9%'

union all

select 0.00000005 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '0-9%'

union all

select -0.1 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '0-9%'

union all

select 123 as field
from system.one
where
case
when field >= 0.9
then '90-100%'
when field >= 0.8 and field < 0.9
then '80-89%'
when field >= 0.7 and field < 0.8
then '70-79%'
when field >= 0.6 and field < 0.7
then '60-69%'
when field >= 0.5 and field < 0.6
then '50-59%'
when field >= 0.4 and field < 0.5
then '40-49%'
when field >= 0.3 and field < 0.4
then '30-39%'
when field >= 0.2 and field < 0.3
then '20-29%'
when field >= 0.1 and field < 0.2
then '10-19%'
else '0-9%'
end != '90-100%'
Loading

0 comments on commit 9bd623e

Please sign in to comment.