Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dm_lecturer_comment #159

Closed
parfenovma opened this issue Feb 22, 2025 · 0 comments
Closed

dm_lecturer_comment #159

parfenovma opened this issue Feb 22, 2025 · 0 comments
Assignees
Milestone

Comments

@parfenovma
Copy link
Contributor

parfenovma commented Feb 22, 2025

select 
	lecturer.api_id as lecturer_api_id,
	comment.api_uuid as comment_api_uuid,
	max(lecturer.first_name || lecturer.last_name || lecturer.middle_name) as lecturer_full_name,
	max(lecturer.first_name) as first_name,
	max(lecturer.last_name) as last_name,
	max(lecturer.middle_name) as middle_name,
	max(lecturer.timetable_id) as timetable_id,
	(max(lecturer.timetable_id) is distinct from null) as has_timetable_id,
	coalesce(max(lecturer.subject), 'No subject') as lecturer_sublect,
	coalesce(max(comment.subject), 'No subject') as comment_subject,
	substring(max(comment.text) for 80) as comment_shortened_text,
	max(comment.text) as comment_full_text,
	max(comment.create_ts) as comment_create_ts,
	max(comment.update_ts) as comment_update_ts,
	max(link_user_comment.user_id) as user_id,
	max(user_info.full_name) as user_full_name,
	max(user_info.email) as user_email
from "DWH_RATING".comment as comment
left join "DWH_RATING".lecturer as lecturer
on comment.lecturer_id = lecturer.api_id
left join "ODS_RATING".lecturer_user_comment as link_user_comment
on link_user_comment.lecturer_id = lecturer.api_id
left join "DWH_USER_INFO".info as user_info
on link_user_comment.user_id = user_info.user_id
where lecturer.valid_to_dt is null and comment.valid_to_dt is null
group by comment.api_uuid, lecturer.api_id;
@github-project-automation github-project-automation bot moved this to Backlog in Viribus Team Feb 22, 2025
@parfenovma parfenovma self-assigned this Feb 22, 2025
@parfenovma parfenovma moved this from Backlog to Done in Viribus Team Feb 22, 2025
@parfenovma parfenovma moved this from Done to In Progress in Viribus Team Feb 22, 2025
@parfenovma parfenovma added this to the User activity milestone Feb 22, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Viribus Team Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant