view_fix
This commit is contained in:
parent
33bdd152e4
commit
c0c5287e79
2 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
|
||||||
|
|
||||||
|
|
||||||
|
<changeSet id="0001" author="absatarov">
|
||||||
|
<comment>fix view deregistration.view_generated_solutions </comment>
|
||||||
|
<sql>
|
||||||
|
CREATE OR REPLACE VIEW deregistration.view_generated_solutions AS
|
||||||
|
SELECT
|
||||||
|
generated_solutions.generated_solutions_id,
|
||||||
|
generated_solutions.count_arrived_death_reason + generated_solutions.count_arrived_age_limit AS count_arrived_all,
|
||||||
|
COALESCE(ROUND(generated_solutions.count_arrived_death_reason::numeric * 100::numeric / NULLIF((generated_solutions.count_arrived_death_reason + generated_solutions.count_arrived_age_limit)::numeric, 0::numeric)), 0::numeric) AS percent_arrived_death_reason,
|
||||||
|
COALESCE(ROUND(generated_solutions.count_arrived_age_limit::numeric * 100::numeric / NULLIF((generated_solutions.count_arrived_death_reason + generated_solutions.count_arrived_age_limit)::numeric, 0::numeric)), 0::numeric) AS percent_arrived_age_limit
|
||||||
|
FROM deregistration.generated_solutions;
|
||||||
|
</sql>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
|
|
@ -37,4 +37,5 @@
|
||||||
<include file="20250519-db_changes.xml" relativeToChangelogFile="true"/>
|
<include file="20250519-db_changes.xml" relativeToChangelogFile="true"/>
|
||||||
<include file="20250522-db_changes.xml" relativeToChangelogFile="true"/>
|
<include file="20250522-db_changes.xml" relativeToChangelogFile="true"/>
|
||||||
<include file="20250530-SUPPORT-9212_idmv3.xml" relativeToChangelogFile="true"/>
|
<include file="20250530-SUPPORT-9212_idmv3.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="20250815-view_fix.xml" relativeToChangelogFile="true"/>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue