Skip to content

Instantly share code, notes, and snippets.

View bl1zzz7k's full-sized avatar
💭
🚀

Dmitry Zorin bl1zzz7k

💭
🚀
View GitHub Profile
@bl1zzz7k
bl1zzz7k / playable_bonua_fix.sql
Created October 13, 2022 14:10
account playable bonus issue
declare @AccountTable table
(
party_id int,
playable_bonus numeric(38, 18)
)
declare @InvalidAccount table
(
party_id int,
manual_bonus_platform_provider_id int,
bonus_plan_id int,
@bl1zzz7k
bl1zzz7k / released_bonuses_fix.sql
Created October 13, 2022 14:08
account released bonuses iisue
declare @AccountTable table
(
party_id int,
released_bonus numeric(38, 18)
)
declare @InvalidAccount table
(
party_id int,
manual_bonus_platform_provider_id int,
bonus_plan_id int,
with sp as (
select top 19 sp.partyId, sp.brandId
from (values (6540827, 165), (6563376, 165), (6563377, 165), (6563732, 165), (6563378, 165), (6563733, 165), (6563379, 165), (6563734, 165), (6564111, 165), (6563380, 165), (6564112, 165), (6563735, 165), (6563381, 182), (6564465, 165), (6564842, 165), (6564843, 165), (6564113, 165), (6563736, 165), (6564114, 165), (6563382, 165), (6564115, 165), (6564466, 165), (6565276, 165), (6565277, 165), (6564467, 165), (6564116, 165), (6565278, 165), (6564468, 165), (6564117, 165), (6564844, 165), (6563737, 165), (6564845, 165), (6564469, 165), (6563738, 165), (6565279, 165), (6564846, 165), (6565651, 165), (6564847, 165), (6564470, 165), (6565652, 165), (6563739, 165), (6565653, 165), (6565654, 165), (6564848, 165), (6564471, 165), (6564472, 165), (6564118, 165), (6563740, 165), (6563741, 165), (6564849, 165), (6564473, 165), (6564474, 165), (6564119, 165), (6563742, 165), (6565280, 165), (6563743, 165), (6565281, 165), (6564475, 165), (6565655, 165), (6565282,
{
"tripId": "6653a512-3b6a-4f36-b6b9-abc615298d09",
"userPreferences": {
"city": "Anchorage, AK",
"country": "United States",
"breakfast": "IN_HOTEL",
"pace": 50,
"moving": 50,
"categories": [
{
{
"tripId": "886ec013-40ee-4113-bbc7-56fc09306d1a",
"userPreferences": {
"city": "Miami, FL",
"country": "United States",
"breakfast": "IN_HOTEL",
"pace": 50,
"moving": 50,
"categories": [
{
{
"tripId": "e7e64865-0b66-45d9-9008-50b857ad9f9f",
"userPreferences": {
"city": "Prescott, AZ",
"country": "United States",
"breakfast": "IN_HOTEL",
"pace": 50,
"moving": 50,
"categories": [
{