Viewing 15 posts - 1,111 through 1,125 (of 1,398 total)
If dupes are ok but the alerttypeid may only be in (4, 6), then maybe this works
with only_two_cte(alertid) as (
select
...
March 19, 2020 at 7:54 pm
with only_two_cte(alertid) as (
select
alertid
from
#aaa
...
March 19, 2020 at 7:43 pm
Ok yeah I'm starting to see the alerttypeid's should be counted separately.
March 19, 2020 at 7:38 pm
with only_two_cte(alertid) as (
select
alertid
from
#aaa
...
March 19, 2020 at 7:03 pm
select distinct
first_value(alertid) over (partition by alerttypeid order by alertid desc) alertid,
alerttypeid
from
#aaa
where
alerttypeid in(4,6);
March 19, 2020 at 12:23 pm
;with
ordered_amounts as (
select distinct first_value(amount) over (partition by userid order by keyid desc) amount from #t)
select
sum(amount) total
from
ordered_amounts;
This...
March 18, 2020 at 11:57 am
;with
ordered_amounts as (
select distinct first_value(amount) over (partition by userid order by keyid desc) amount from #t)
select
sum(amount) total
from
ordered_amounts;
March 17, 2020 at 5:12 pm
I need one column for BSP between 1 and 3, one column for BSP between 3 and 5, one column for bsp between 5 and 8 (and up to...
March 16, 2020 at 12:52 pm
Sometimes spreadsheets are useful to concatenate together parameterized sql code.
="sum(case when (td.BSP >="&B7&" and td.BSP <"&C7&") and td.WIN_LOSE=1 then td.BSP end) as SumWinnerPrice"&B7&"to"&C7
="count(case when (td.BSP >="&B8&" and...
March 15, 2020 at 7:47 pm
declare
@txt varchar(100)='CKnovelty2002_pouch-5AR-OneSize';
--@txt ...
March 10, 2020 at 12:14 pm
I had a similar difficulty in explaining why I felt procs were preferable to EF.
By "EF" do you mean "Entity Framework" as in Microsoft? You do realize...
March 6, 2020 at 1:42 pm
"...from a developer point of view..." Why is it "more difficult" to build with stored procedures:
March 6, 2020 at 12:09 pm
It's all predicated on the false assumption "a billion flies can't be wrong"
March 3, 2020 at 12:44 pm
...how the design of a database schema (logical design of tables and queries) is affected by horizontal scaling...
Primarily through indexing. Indexes are logical objects which exist for purely physical...
February 29, 2020 at 12:51 pm
There are a lot of assumptions baked into the questions. Why are you storing shopping cart information as serialized data?
February 29, 2020 at 12:34 pm
Viewing 15 posts - 1,111 through 1,125 (of 1,398 total)