Skip to content

Unable to translate LINQ Query

I am having an issue with the following LINQ query: var baselineDate = DateTime.Now.AddDays(-365); var salesPerformance = _context.SalesOrder.Where(p => p.OrderDate >= baselineDate)….

Find IDs with only one observation in PostgreSQL

I have the following table: CREATE TABLE my_table ( the_visitor_id varchar(5) NOT NULL, the_visitor_visit timestamp NOT NULL, the_visitor_returning text ); INSERT INTO my_table VALUES (‘…

Select id from input list NOT present in database

With MySql vers 8.0: CREATE TABLE cnacs(cid VARCHAR(20), PRIMARY KEY(cid)); Then, INSERT INTO cnacs VALUES(‘1’); The first two statements execute successfully. The next statement does not, however. …

Group by and display count in Excel

I am trying to learn some Excel’s features and I want to know if it is possible to make an SQL-like statement in Excel. For example, I distincted a dataset and the output is: I want to make a count(*) and a group by like: Answer Initial data: Create a pivot table. When you drag columns like this… …