Active Network Interview Question: What is a Common Table Expres... | Glassdoor

Interview Question

Web Developer III Interview Dallas, TX

What is a Common Table Expression?

Tags:
sql, mvc, issues, contract, non compete, common table expression
Answer

Interview Answer

1 Answer

0

This is a Common Table Expression:

  ;with recentMod_CTE (ProductID, ListPrice, ModifiedDate)
  AS
  (
      select p.ProductID, p.ListPrice, p.ModifiedDate from AdventureWorks2012.Production.ProductListPriceHistory p
  )
  select ProductID, sum(ListPrice) from recentMod_CTE
  where ProductID > 708
  group by ProductID

There are about 9 lifecycle functions in ASP.NET. This page has some details:
http://msdn.microsoft.com/en-us/library/ms178472%28v=vs.80%29.ASPX

Interview Candidate on Aug 31, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.