Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
select * from( select o.dateordered,o.company,o.orderid,RTRIM ( LTRIM( o.billfirstname + ' ' + o.billlastname ) ) billfullname,o.email,o.itemid as oitemid ,p.cost1,p.cost2,p.cost3,p.productid,p.title as ptitle ,e.title as etitle ,s.status ,i.sku,i.quantity,i.itemid as iitemid ,CASE sku WHEN p.internalsku1 THEN p.cost1*i.quantity WHEN p.internalsku2 THEN p.cost2*i.quantity WHEN p.internalsku3 THEN p.cost3*i.quantity ELSE 0 END as cost ,(select sum(subtotal) from orderitems where orderid=o.orderid)as subtotal ,(select SUM(debit) from payments where orderid=o.orderid and ( (type='Paypal' and 'confirmation'!='' and resultcode!='Denied' and resultcode!='unconfirmed') or (type!='Paypal') ) )as debit ,(select min(itemid) from orderitems where orderid=o.orderid)as minitemid from orders o INNER JOIN orderitems i on i.orderid = o.orderid INNER JOIN products p on i.productid = p.productid left join ebaydata e on o.orderid = e.orderid left join sstatuses s on o.statusid=s.statusid where (o.dateordered between '11/01/2010' and '11/09/2010') AND o.orderid In (select orderid from orderitems i,Products P Where i.productid = p.productid and P.title LIKE '%sd%') and o.statusid in (10,90,110,260) and ( (company='company1'and o.itemid>0) or (company='company2'and o.itemid>0) or o.itemid=0 ) )Derived where debit>0 order by orderid desc
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Set the max value for a column||7||41|
|MS SQL Server - Looking to filter rows based on column value||3||56|
|Update a summary table with values from detail records||6||36|
|Substring works but need to tweak it||14||31|