Viewing 15 posts - 16 through 30 (of 58 total)
ShambhuRai-4099 JingyangLi · 3 minutes ago
when value is same for the status then it should take min date
expected output
('2022-01-04 18:00:57','Newone','segmentone')
when the value is change for the status then max date
expected output
('2022-04-04 19:00:57','Newtwo','segmentfour')
April 19, 2022 at 4:23 pm
Hi Expert,
Hi Expert,
there is condition when value is same for the status then it should take min date and if the value is change for the status then max date
create...
April 19, 2022 at 11:59 am
HI Expert,
This is perfect. but the data needs max(date) should be order by same day and not all calendar days
insert into test
values
('2022-01-04 18:00:57','Newone','segmentone'),('2022-01-04 19:00:57','Newone','segmenwo'),
('2022-04-04 18:00:57','Newtwo','segmenthee'),('2022-04-04 19:00:57','Newtwo','segmenfour')
expected output:
('2022-01-04 19:00:57','Newone','segmenwo'),
('2022-04-04 19:00:57','Newtwo','segmenfour')
April 18, 2022 at 3:24 pm
what a solution ..is there any easiest way to do this just want to have capital word after space
March 24, 2022 at 7:16 pm
it shows multiple dates for values which is incorrect
March 21, 2022 at 12:43 pm
Hi Expert,
it is showing incorrect output. Am attaching the expected output again
March 15, 2022 at 3:48 pm
i tried
SELECT TestID, Status, StartDate, case when Lead(StartDate) OVER (PARTITION BY TestID ORDER BY StartDate) =LEAD(StartDate) OVER (PARTITION BY TestID ORDER BY StartDate) then Lag(StartDate) OVER (PARTITION BY TestID ORDER...
March 15, 2022 at 3:18 pm
I have repeated and loaded the insert statement
insert into table3
values
('1','Progress', '20210203'),
('1', 'Closed', '20220403'),
('2', 'Closed', '20220703'),
('2', 'Progress', '20220503')
it is showing wrong output
if the date is repeated...
March 15, 2022 at 2:51 pm
select Testid, Status ,count(testid) as count,
Startdate, lead(DATEADD(day,-1,Startdate)) over (order by testid,Startdate) from table3 group by Testid,Status,Startdate
I tried above lead function but unable to get above output
March 15, 2022 at 1:43 pm
Hi,
Actually id do not understand logic for this help me with clue
on the 6th April -Main Table - 1 (quantity )sold and 73 consumables from Ratio Table on 7th April-...
February 28, 2022 at 11:24 pm
when i have added 2 rows and max 2 rows is giving '2021-02-19' only one record
('577', '-1', '0', '2021-02-19');
('577', '-1', '1', '2021-02-20');
February 28, 2022 at 7:28 am
Viewing 15 posts - 16 through 30 (of 58 total)