Viewing 15 posts - 16 through 30 (of 50 total)
Interesting list of cities that spark some memories in the old databrain. I've got 14 visits and also memories of what could have been 11 more that were last minute...
April 29, 2022 at 3:20 pm
You appear to be mixing data types in the dates of the txt file. StartDate and EndDate are DATE, but Insertion_Date and Removal_Date are VARCHAR(23) that look like datetime, so...
April 8, 2022 at 6:48 pm
The StartDate EndDate overlaps and possible insert/remove multiples make this data fun. I'm familiar with medical data cauti/clabsi counting, and this specific example is looking for February. The patient (10215)...
April 7, 2022 at 4:37 pm
What Phil said, though it seems that this question has surfaced in many places with many suggestions being guessed. I'd guess that date overlaps are an issue, changing logic around...
April 6, 2022 at 3:14 pm
Probably something using pivot. Knowing how many possible team columns can make it a bit more straightforward, but it can be done dynamically with more effort. There are examples via...
April 4, 2022 at 4:59 pm
I'd try a Lead or Lag with a partition by Year if you are on SQL 2012 or newer.
April 4, 2022 at 4:48 pm
The logic example and expected output seem to be a little different. Maybe I'm not reading clearly. It does get difficult when the main table is used singularly (treating the...
March 10, 2022 at 8:42 pm
A windowed lag function might work. I'm farther away from efficient SQL production queries, so there might be better ways, but I was thinking something like:
select N,...
October 18, 2021 at 2:38 pm
What do you mean by "extraction inside 5-95 quantiles?" I read that as limiting the mean/min/etc to a reduced set that excludes values below 5th and above 95th, but I'm...
October 11, 2021 at 1:22 pm
If you add the table definitions and some sample data, this might be an easily solved question. Guessing at table contents/structure makes it very difficult to guess the correct direction.
September 28, 2021 at 5:45 pm
Could be data that isn't unique as thought, or maybe the join criteria is missing for some of the tables and creating a cross join that adds multiple records unexpectedly,...
September 27, 2021 at 7:43 pm
I think Ken wrote his by product before the requirements were clarified, so it misses 1112, '01/01/2017', '05/31/2021', 'BBB' . Oddly, I wrote an R solution in about 3 minutes,...
August 20, 2021 at 5:12 pm
Hi Phil, This one looks good. Since the datedif field is null on population and desired output has a zero for the first row of each partition, the poster might...
July 23, 2021 at 2:39 pm
For the update:
Temperature(5c-20c)resistance(10c-30c)cold(NULL-40c) air(NULL-7c)
Should this be updated in the updatedStuffDiff column of every records in the #Featuresvalue table with PartId=555?
In my head, I'm seeing some sort of full outer join...
March 8, 2021 at 10:21 pm
It looks like you are only calculating the product in a diagonal the extends down and to the right from each position. You will also need to calculate a product...
March 1, 2021 at 1:53 am
Viewing 15 posts - 16 through 30 (of 50 total)