Skip to content

Instantly share code, notes, and snippets.

View meetchandan's full-sized avatar
🎯

Chandan Bhattad meetchandan

🎯
View GitHub Profile
update customer_address
set is_deleted = 1
where address_code in ("596f1496cc3866847bd9607efdde1516","e9362f5b9585e9869b78575d6fda720d","f2f31bcc7e529e43f41d30e9f5ddd97b","c97b82645a8642b00d20681e4b6a210c","d15f71e30537cc5f34f9440b8c606413","bf154e63d47ed6689a63f154f079b6dd","3aa44019ac2fbf439e8c3bb37ceb8932","21617112c6daebc9854e51322270e0e8","90ca2b8e62b54fca27a4244d07d9cfca","fdcd24b356b4361948a6f7e3cec06bc8","fcfca590f647faf2bcd589be651fdd62","829b82f962d40c7fb8901b08c9506667","0dde17de941a7d44886cdb898cfad03d","d591ae719ae87016470b6107251a17d9","48963713aa812b0556b7e25bcc12ca91","7b4380a0b7c039fbb7508f5f96ea1967","c70f127851b422251ba86964f54c255a","5e2e89f2306cf83be7be40b8b25a5ff7","09e6d50d45bae0971ce0cdda79a874c0","dc5f52223f6921a2b5e98acc312d1cd5","d5bcbb37b3d4f01a23f2412290ecb7d9","11b799628ad5fc636d70fd611c3e418c","16276a239a48250b4e1ce007d4a731b3","219a1abd34b235794b5e627a43c580ea","0a0dc8290fc56ebc45fe15b919207512","21f817a14cf01d81e679e216ba7e565b","5e7e857d46d7abb320f8e49f2229c9a6","b7e9dd36fe1e
{
"nbHits": 1,
"nbPages": 1,
"search": {
"q": null,
"sort": null,
"f": {
"page_code": [
"home_app_mobile_ae_v2"
]
SELECT
zp.zsku_parent,
a.attribute_id,
a.attribute_code,
a.attribute_name_en,
a.attribute_name_ar,
a.attribute_type,
a.attribute_namespace AS namespace_code,
a.is_multivalued,
a.is_localizable,
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IAEF6H759ZNA5YRRXA"
},
"lines": [
{
"entity_from": "entity::legal_entity_v2::ae::LE1QX7CQGAE",
"entity_to": "entity::customer_address::ae::50c3d72fa9091aa3733558ac64dcf868::2",
{
"exref": {
"exref_type_code": "mp_instant_order",
"mp_code": "nooninstant",
"external_ref": "IAEF6H759ZNA5YRRXA"
},
"lines": [
{
"entity_from": "entity::partner::ae::302207",
"entity_to": "entity::customer_address::ae::50c3d72fa9091aa3733558ac64dcf868::2",
insert into minutes_price(country_code, price, psku_code, is_active, msrp)
values
('AE', 1750 , 'a71f4fc2e0120913ff612ce5fb7595ca', true, null),
('AE', 1800 , 'a5685af91220017aed8642f89220502a', true, null),
('AE', 1300 , 'a893e369f41b85596e19f59a3228d73a', true, null),
('AE', 1600 , 'a58f7c9dcf65f97a8f229979645dd26a', true, null),
('AE', 1000 , 'ad4719ea7585cf269beb35f08b83107a', true, null),
('AE', 1000 , 'a830be40e4104b1966545ca7be80986a', true, null),
('AE', 11000 , 'a704fc729f48bcd8e18ad8de6f9d290a', true, null),
('AE', 7000 , 'a9392f6ffce3201bc7fb7cbef871c2ba', true, null),
Select
country_code,date(subscribed_timestamp) as acq_date,
CASE
WHEN lower(mp) in ('food','noonfood') then 'food'
WHEN lower(mp) in ('nooninstant') then 'minutes'
WHEN lower(mp) in ('ecom') then 'core'
else lower(mp)
end as mp,
count(distinct customer_code) as cx_count
from
<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
<channel>
<title>noon</title>
<link>http://www.noon.com</link>
<description></description>
{% for row in rows %}
<item>
{% for key, val in row.items() -%}
SELECT
sku,
pen.brand AS brand_en,
COALESCE(po.en_title, pen.base_title) AS base_title_en,
COALESCE(JSON_EXTRACT_SCALAR(pen.attributes, '$.product_subtitle'), po.en_size_info,
CASE
WHEN JSON_EXTRACT_SCALAR(pen.attributes, '$.vsku_size_info') IS NOT NULL THEN JSON_EXTRACT_SCALAR(pen.attributes, '$.vsku_size_info')
WHEN JSON_EXTRACT_SCALAR(pen.attributes, '$.size_info') IS NOT NULL THEN JSON_EXTRACT_SCALAR(pen.attributes, '$.size_info')
WHEN JSON_EXTRACT_SCALAR(pen.attributes, '$.size') IS NOT NULL AND JSON_EXTRACT_SCALAR(pen.attributes, '$.size_unit') IS NOT NULL AND JSON_EXTRACT_SCALAR(pen.attributes, '$.quantity') IS NOT NULL THEN CONCAT(JSON_EXTRACT_SCALAR(pen.attributes, '$.size'), JSON_EXTRACT_SCALAR(pen.attributes, '$.size_unit'), ' x ', JSON_EXTRACT_SCALAR(pen.attributes, '$.quantity'))
WHEN JSON_EXTRACT_SCALAR(pen.attributes, '$.size') IS NOT NULL AND JSON_EXTRACT_SCALAR(pen.attributes, '$.size_unit') IS NOT NULL THEN CONCAT(JSON_EXTRACT_SCALAR(pen.attributes, '$.siz
select
mu.id_partner,
mu.statement_date,
mu.statement_nr,
mu.currency_code,
ft.name_en as fee_name,
mu.unique_line_ref1 as item_nr,
mu.delta_amount as amount
from noonbiprosel.mpst_union.mpst_union mu
left join noondwh.mpst.fee_type_v2 ft on ft.zsku= mu.zsku