SELECT Year, Actor1Name, Actor2Name, Count FROM (SELECT Actor1Name, Actor2Name, Year, COUNT(*) Count, RANK() OVER(PARTITION BY YEAR ORDER BY Count DESC) rankFROM (SELECT Actor1Name, Actor2Name, Year FROM [gdelt-bq:full.events] WHERE Actor1Name < Actor2Name and Actor1CountryCode != '' and Actor2CountryCode != '' and Actor1CountryCode!=Actor2CountryCode), (SELECT Actor2Name Actor1Name, Actor1Name Actor2Name, Year FROM [gdelt-bq:full.events] WHERE Actor1Name > Actor2Name and Actor1CountryCode != '' and Actor2CountryCode != '' and Actor1CountryCode!=Actor2CountryCode),WHERE Actor1Name IS NOT nullAND Actor2Name IS NOT nullGROUP EACH BY 1, 2, 3HAVING Count > 100)WHERE rank=1ORDER BY Year
SELECT MonthYear MonthYear, INTEGER(norm*100000)/1000 PercentFROM (SELECT ActionGeo_CountryCode, EventRootCode, MonthYear, COUNT(1) AS c, RATIO_TO_REPORT(c) OVER(PARTITION BY MonthYear ORDER BY c DESC) norm FROM [gdelt-bq:full.events]GROUP BY ActionGeo_CountryCode, EventRootCode, MonthYear)WHERE ActionGeo_CountryCode='UP' and EventRootCode='14'ORDER BY ActionGeo_CountryCode, EventRootCode, MonthYear;
“Google maintains its leadership in building a renewably powered internet, as it significantly expands its renewable energy purchasing and investment both independently and through collaboration with its utility vendors.”-- Greenpeace Clicking Clean Report, page 6
$ curl https://discovery.etcd.io/newhttps://discovery.etcd.io/b97f446100a293c8107500e11c34864b
$ cat cloud-config.yaml#cloud-configcoreos: etcd: # generate a new token for each unique cluster from https://discovery.etcd.io/new discovery: https://discovery.etcd.io/b97f446100a293c8107500e11c34864b # multi-region and multi-cloud deployments need to use $public_ipv4 addr: $private_ipv4:4001 peer-addr: $private_ipv4:7001 units: - name: etcd.service command: start - name: fleet.service command: start
gcutil --project=<project-id> addinstance--image=projects/coreos-cloud/global/images/coreos-beta-310-1-0-v20140508 --persistent_boot_disk --zone=us-central1-a --machine_type=n1-standard-1 --metadata_from_file=user-data:cloud-config.yaml core1 core2 core3
$ gcutil --project=coreos ssh --ssh_user=core core1
$ cat example.service[Unit]Description=MyAppAfter=docker.serviceRequires=docker.service[Service]RemainAfterExit=yesExecStart=/usr/bin/docker run busybox /bin/echo 'I was scheduled with fleet!'
$ fleetctl start example.service$ fleetctl list-unitsUNIT STATE LOAD ACTIVE SUB DESC MACHINEexample.service launched loaded active exited MyApp b603fc4d.../10.240.246.57
$ fleetctl status example.service● example.service - MyApp Loaded: loaded (/run/fleet/units/example.service; linked-runtime) Active: active (exited) since Thu 2014-05-22 20:27:54 UTC; 4s ago Process: 15789 ExecStart=/usr/bin/docker run busybox /bin/echo I was scheduled with fleet! (code=exited, status=0/SUCCESS) Main PID: 15789 (code=exited, status=0/SUCCESS)May 22 20:27:54 core-01 systemd[1]: Started MyApp.May 22 20:27:57 core-01 docker[15789]: I was scheduled with fleet!
SELECT a.send_hour send_hour, a.event_hour event_hour, a.account_id account_id, a.channel_id channel_id, a.session_id session_id, a.event_type event_type, d.channelKey channel_key, d.sessionKey session_key, a.event_count event_countFROM (SELECT sendHour send_hour, INTEGER(UTC_USEC_TO_HOUR (minEventTime*1000)/1000) AS event_hour, accountId account_id, channelId channel_id, sessionId session_id, 'uniqueopen' event_type, count(1) event_count FROM (SELECT min(eventTime) AS minEventTime, messageGuid, channelId, sessionId, accountId, sendHour FROM WHERE eventType='open' AND eventTime-sendTime < 1209600000 GROUP EACH BY messageGuid, channelId, sessionId, accountId, sendHour HAVING minEventTime>=TIMESTAMP_TO_MSEC(TIMESTAMP('20140416'))) GROUP EACH BY send_hour, event_hour, account_id, channel_id, session_id) aLEFT JOIN EACH [messagebus_com_prod_ACCOUNT_DATA_DS.ACCOUNT_DETAIL] d ON d.sessionId = a.session_idAND d.channelId = a.channel_id
Use promo code NEXT1720 to save $300 off general admission