Skip to content

Commit

Permalink
docs: add sql scripts to query application checklist data (#925)
Browse files Browse the repository at this point in the history
Reviewed-By: Norbert Truchsess <norbert.truchsess@t-online.de>
  • Loading branch information
Phil91 authored Aug 13, 2024
1 parent 058fda7 commit dbf1985
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
32 changes: 32 additions & 0 deletions scripts/sql/GetApplicationChecklistForBpn.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---------------------------------------------------------------
-- Copyright (c) 2024 Contributors to the Eclipse Foundation
--
-- See the NOTICE file(s) distributed with this work for additional
-- information regarding copyright ownership.
--
-- This program and the accompanying materials are made available under the
-- terms of the Apache License, Version 2.0 which is available at
-- https://www.apache.org/licenses/LICENSE-2.0.
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-- License for the specific language governing permissions and limitations
-- under the License.
--
-- SPDX-License-Identifier: Apache-2.0
---------------------------------------------------------------

SELECT application_id, act.label, date_created, date_last_changed, acs.label, comment
FROM portal.application_checklist as ac
JOIN portal.application_checklist_types as act ON act.id = ac.application_checklist_entry_type_id
JOIN portal.application_checklist_statuses as acs ON acs.id = ac.application_checklist_entry_status_id
WHERE application_id in (
SELECT id
FROM portal.company_applications
WHERE company_id in (
SELECT id
FROM portal.companies
WHERE business_partner_number = 'BPNL0000000TESTE'
)
)
33 changes: 33 additions & 0 deletions scripts/sql/GetRegistrationProcessStepsByBpn.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---------------------------------------------------------------
-- Copyright (c) 2024 Contributors to the Eclipse Foundation
--
-- See the NOTICE file(s) distributed with this work for additional
-- information regarding copyright ownership.
--
-- This program and the accompanying materials are made available under the
-- terms of the Apache License, Version 2.0 which is available at
-- https://www.apache.org/licenses/LICENSE-2.0.
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-- License for the specific language governing permissions and limitations
-- under the License.
--
-- SPDX-License-Identifier: Apache-2.0
---------------------------------------------------------------

SELECT ps.id, pst.label, pss.label, date_created, date_last_changed, process_id, message
FROM portal.process_steps as ps
JOIN portal.process_step_types as pst ON pst.id = ps.process_step_type_id
JOIN portal.process_step_statuses as pss ON pss.id = ps.process_step_status_id
WHERE ps.process_id in (
SELECT checklist_process_id
FROM portal.company_applications
WHERE company_id in (
SELECT id
FROM portal.companies
WHERE business_partner_number = 'BPNL0000000TESTE'
)
)
order by date_created desc

0 comments on commit dbf1985

Please sign in to comment.