Skip to content

Tag: sql

Find minimum and show the area/values around it

I would like to find a minimum in a very long time series, but instead of show the whole series with 2000 points, or only 1 line, I want to show the 20 rows with the profit value before and after the minimum, result example : So, per company, find the minimum, then print the “area” around the mini…

Prioritising column in a left join SQL

I am having issues with a join and I was hoping to get some help. I have one table (table A) that is structured like so: Fruit SKU Apple 001 Apple X01 Apple B01 Banana 002 Banana X02 Banana B01 Orange 003 Orange B03 For each fruit, there is a SKU that corresponds to the numbering system used in a

C# is adding 00:00:00 unnecessarily

My SQL Server is using the DATE datatype, but my C# app is reading this as ‘mm/dd/yyyy 00:00:00’, can anyone tell me how to get rid of the 0s? (everything else works)…? Answer If you don’t want the time portion of a DateTime as String you have several options: Read: Date and time forma…