Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mpp-batch-views
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
mpp-batch-views
Commits
4347ad2f
Commit
4347ad2f
authored
Jun 19, 2023
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
f1e639a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
v_batch_running.txt
v_batch_running.txt
+13
-0
No files found.
v_batch_running.txt
0 → 100644
View file @
4347ad2f
SELECT subquery.batch_no,
subquery.process_stage_id,
subquery.master_product_id,
subquery.batch_start,
concat((subquery.hours)::text, ' hrs', ' : ', lpad((subquery.minutes)::text, 2, '0'::text), ' mins') AS duration_formatted
FROM ( SELECT batch_details.batch_no,
batch_details.process_stage_id,
batch_details.master_product_id,
batch_details.batch_start,
((date_part('day'::text, (now() - batch_details.batch_start)) * (24)::double precision) + date_part('hour'::text, (now() - batch_details.batch_start))) AS hours,
date_part('minute'::text, (now() - batch_details.batch_start)) AS minutes
FROM batch_details
WHERE ((batch_details.batch_start IS NOT NULL) AND (batch_details.batch_end IS NULL))) subquery;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment