-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create studentmodulehistoryextended under external/irx models
- Loading branch information
1 parent
daeca36
commit f43c936
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
.../external/irx/mitx/irx__mitx__openedx__mysql__courseware_studentmodulehistoryextended.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
with studentmodulehistoryextended as ( | ||
select * from {{ ref('stg__mitxresidential__openedx__courseware_studentmodulehistoryextended') }} | ||
) | ||
|
||
, studentmodule as ( | ||
select * from {{ ref('stg__mitxresidential__openedx__courseware_studentmodule') }} | ||
) | ||
|
||
select | ||
studentmodule.courserun_readable_id as course_id | ||
, studentmodule.user_id | ||
, studentmodule.coursestructure_block_id as module_id | ||
, studentmodule.coursestructure_block_category as module_type | ||
, studentmodulehistoryextended.studentmodule_state_data as state_data | ||
, studentmodulehistoryextended.studentmodule_problem_grade as grade | ||
, studentmodulehistoryextended.studentmodule_problem_max_grade as max_grade | ||
, studentmodulehistoryextended.studentmodule_created_on as created | ||
from studentmodulehistoryextended | ||
inner join studentmodule on studentmodulehistoryextended.studentmodule_id = studentmodule.studentmodule_id |