Skip to content

Instantly share code, notes, and snippets.

create table foresee_orders as
(
select distinct b.member_id, o.order_id, b.order_dwkey, b.receive_date_dwkey, d.the_date last_order_date, o.billing_address_id,
case when o.shipping_sequence = 1 then 'new' else 'repeat' end cust_type, md.login_name email
from dsdw_prod.orders_dim o, dsdw_prod.members_dim md, dsdw_prod.date_dim d,
(
select distinct member_id, max(order_dwkey) order_dwkey, max(receive_date_dwkey) receive_date_dwkey
from dsdw_prod.orders_dim o, (select distinct date_dwkey from dsdw_prod.date_dim where the_date >= to_date('123012','mmddyy') AND the_date <= to_date('010513','mmddyy')) d
where ORDER_SHIPPED_DATE_DWKEY = D.DATE_DWKEY and
o.cancelled_order_flag = 'N' and o.order_type != 2 and o.site_id in (0,1,30) and nvl(shipping_sequence, -1) != -1
title color graphite_object
----------------------------- -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SELECT lines.lineitem, lines.description, lines.partid,
lines.unitprice, lines.quantity
FROM purchaseorder,
XMLTable('for $i in /PurchaseOrder/LineItems/LineItem
where $i/@ItemNumber >= 8
and $i/Part/@UnitPrice > 50
and $i/Part/@Quantity > 2
return $i'
PASSING OBJECT_VALUE
COLUMNS lineitem NUMBER PATH '@ItemNumber',
select order_id, order_Revision, order_revision_date, revision_closed, SITE_ID, member_id,
EXTRACTVALUE(order_xml,'/Order/OrderHeader/HandlingMethod','xmlns="http://schemas.drugstore.com/OPERA"') shipping_method,
XMLCast(XMLQuery('declare default element namespace "http://schemas.drugstore.com/OPERA"; /Order/OrderHeader/PlacedDate' passing order_xml returning content) as varchar2(400)) placedDate
from orders
join ORDERS_TIPS using (order_id)
where ORDER_ID = 10000604275
and orders.order_revision = order_revision_tip
go
select order_id, order_Revision, order_revision_date,
EXTRACTVALUE(order_xml,'/Order/OrderHeader/HandlingMethod','xmlns="http://schemas.drugstore.com/OPERA"') shipping_method,
def create_auto_filters(query, result):
columns = [int(x) for x in query["auto_filter_columns"].split(",")]
data_columns = [int(x) for x in query["auto_filter_column_data"].split(",")]
conn = global_oms.connect()
for row in result["rows"]:
title = query["name"]
url_name = [query["url_name"]]
qry_filter = []
for c in columns:
/*=============================================================================================================
Ticket Number : 12776
Ticket Description : Re-assign leads from Jeff Anderson to SarahMit for closed leads
NOTE: This will take about 6-8 minutes or so to run, but almost 2-3 minutes of it will be in a WAIT delay.
Revision History
----------------------------------------------------------------------------------------------------------
Date Name Description
! Amazon Web Services
! Virtual Private Cloud
!
! AWS utilizes unique identifiers to manipulate the configuration of
! a VPN Connection. Each VPN Connection is assigned an identifier and is
! associated with two other identifiers, namely the
! Customer Gateway Identifier and Virtual Private Gateway Identifier.
!
! Your VPN Connection ID : vpn-4bfe2c55
! Your Virtual Private Gateway ID : vgw-b5cb19ab
select pdbcode, pdbchain, cnt, other_col
from pdbcode a,
(select pdbcode, count(*) cnt
from pdbcode
group by pdbcode) b
where a.pdbcode = b.pdbcode
"""Given a tic-tac-toe board, determine if the game is won.
- Allow the user to select a choice, and error appropriately if the choice is invalid
- Have the computer play, randomly picking a valid choice
Test input:
x-x-oox-- # No winner
o-xo-xo-- # O wins
xxxo-o-o- # X wins
xooox-x-x # X wins
xooox-o-x # X wins
{
"Outputs": {
"AWSEBLoadBalancerURL": {
"Description": "The ElasticBeanstalk ELB URL of the website",
"Value": {
"Fn::Join": ["", ["http:\/\/",
{
"Fn::GetAtt": ["AWSEBLoadBalancer", "DNSName"]
}]]
}