This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sample_geocoder () { | |
const address = SpreadsheetApp.getActiveSheet().getRange(1,1).getValue(); | |
var | |
geocoder = Maps.newGeocoder() // Creates a new Geocoder object. | |
, geocoder = geocoder.setLanguage('ja') // Use Japanese | |
, response = geocoder.geocode(address).results[0]; // ets the approximate geographic points for a given address. | |
Logger.log(response); | |
}// function sample_geocoder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
user.id | |
, max_by( log.url, td_time_parse( log.created_at ) ) as url | |
from | |
user | |
left outer join | |
log | |
on user.id = log.user_id | |
group by | |
user.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function measuringExecutionTime() { | |
// A simple INFO log message, using sprintf() formatting. | |
// 懐かしの printf と同じ感じ %s → 'myFn\unction' %d → 1 が入っている。 | |
console.info('Timing the %s function (%d arguments)', 'myFunction', 1); | |
// Log a JSON object at a DEBUG level. The log is labeled | |
// with the message string in the log viewer, and the JSON content | |
// is displayed in the expanded log structure under "structPayload". | |
var parameters = { | |
isValid: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
salses.id, sales.name, companies.name, sales_contact.mail | |
from | |
sales | |
left outer join sales_contact on sales.id = sales_contact.sales_id | |
left outer join sales_belonging on sales.id = sales_belonging.sales_id | |
left outer join companies on sales_belonging.company_id = companies.id | |
where | |
(sales.age > 20 | |
or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ロケチャ送信用関数 | |
function send_rocketchat( | |
text | |
){ | |
res | |
= UrlFetchApp | |
.fetch( | |
"https://chat.leverages.jp/hooks/Pi8sjveH3qYu8FeLx/mEB4kng92jPBhRLzCwjPYbD8gi2bYAtNcSYiAhwHavPJBACu" | |
, { | |
"payload" : JSON.stringify({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
map( | |
array['pref_id','pref_name'] | |
, array[cast(id as varchar), name] | |
) | |
from | |
pref |