This file contains 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 | |
( week_0_cohort/week_0_cohort ) AS week_0, | |
( week_1_cohort/week_0_cohort ) AS week_1, | |
( week_2_cohort/week_0_cohort ) AS week_2, | |
( week_3_cohort/week_0_cohort ) AS week_3 | |
FROM ( | |
WITH week_0 AS( | |
SELECT DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` |
This file contains 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
WITH week_0 AS( | |
SELECT DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` | |
WHERE _TABLE_SUFFIX BETWEEN '20180731' AND '20180807' | |
), | |
week_1 AS ( | |
SELECT DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` | |
JOIN base using(user_pseudo_id) |
This file contains 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
WITH base AS( | |
SELECT DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` | |
WHERE _TABLE_SUFFIX BETWEEN '20180731' AND '20180807' | |
) | |
SELECT DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` | |
JOIN base using(user_pseudo_id) | |
WHERE _TABLE_SUFFIX BETWEEN '20180807' AND '201808015' |
This file contains 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 DISTINCT user_pseudo_id | |
FROM `firebase-public-project.analytics_153293282.events_*` | |
WHERE _TABLE_SUFFIX BETWEEN '20180731' AND '20180807' |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | |
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. | |
--> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<WebPublishMethod>MSDeploy</WebPublishMethod> | |
<ResourceId></ResourceId> | |
<ResourceGroup></ResourceGroup> |
This file contains 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
var query2 = from a in query1 | |
group a by new { year = a.Timestamp.Year, month = a.Timestamp.Month, day = a.Timestamp.Day } into d | |
select new { dt = string.Format("{0}{1}{2}", d.Key.year, d.Key.Month, d.Key.day), count = d.Count }; |
This file contains 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
var query1 = (from b in this.Context.Activities | |
where b.Timestamp > date.Item1 | |
select b | |
).AsEnumerable() | |
This file contains 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
var result = | |
from a in this.Activities | |
where a.Timestamp > date.Item1 | |
group a by new { year=a.Timestamp.Year, month=a.Timestamp.Month, day=a.Timestamp.Day } into d | |
select new { dt = string.Format("{0}{1}{2}", d.Key.year, d.Key.month, d.Key.day), count = d.Count} | |
; |
This file contains 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
public class MyApiController : ApiController | |
{ | |
[HttpGet] | |
[Route("api/myapi/res")] | |
public IHttpActionResult GetResource1() | |
{ | |
return Ok("Hello Andy: welcome to my site "); | |
} | |
} |
This file contains 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
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
AreaRegistration.RegisterAllAreas(); | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
GlobalConfiguration.Configure(WebApiConfig.Register); | |
GlobalConfiguration.Configuration.MessageHandlers.Add(new APIKeyMessageHandler()); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
BundleConfig.RegisterBundles(BundleTable.Bundles); |