<Image Source="{Binding PictureASU, TargetNullValue={StaticResource NoPicture}}" Margin="30" VerticalAlignment="Top" />
select case when a.position = 0
then 0
else a.position +1
end position
from (SELECT COUNT(*) AS `position`
FROM `season_" + season + "`
WHERE `RATING` > ( SELECT `RATING`
FROM `season_" + season + "`
WHERE `ID`= '" + id + "' LIMIT 1 )
) as a
select t1.*, t2.*
from modx_site_content t1
left join modx_ms2_products t2 on t2.id = t1.id
where t1.id = 541
HAVING SUM(table3.bExported) < COUNT(table3.id)
WHERE table3.bExported = FALSE
SELECT `max_height`,`max_width` INTO @max_height, @max_width FROM `maps` WHERE `id` = map_id;
id between 38624 and 38636
SUBSTR(full_story, LOCATE('<br><br>', full_story) +8)
CONCAT('title|', title, '||torrent|')
. Про тег [attachment=837] не понял.CASE WHEN length(xfields) > 0 THEN '||' END
select oi.order_id,
oi.store_id,
oi.customer_id,
oi.order_status
from order_items oi
left join orders_data od on od.order_id = oi.order_id
left join stores st on st.id = oi.store_id
left join customers cu on cu.id = oi.customer_id
where oi.order_status = 'on-hold'
and oi.order_status = 'processing'
and od.data_key = '_shipping_time'
ALTER TABLE `tablename` MODIFY
`user_nickname` VARCHAR(100)
CHARACTER SET utf8
COLLATE utf8_bin