Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mark Jerzykowski

@Mark Jerzykowski
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Your preferred Git UI (if any)?
    M Mark Jerzykowski

    I have used many a git client but for the last year have been using fork Fork - a fast and friendly git client for Mac and Windows[^]. You have to pay for it these days but it’s well worth it in my opinion.

    The Lounge csharp com design collaboration tools

  • Anyone here used CUDA?
    M Mark Jerzykowski

    I used Cuda in my Masters for simulating spiking neural networks. Ended up using cudafy (.Net library) as wanted C# familiarity. Certainly allowed me to run my simulations far quicker but don’t underestimate the amount of effort required to tune (and get right - debugging 1000s of threads isn’t fun) non-trivial algorithms.

    The Lounge question

  • Cloud Wars - Amazon v. Rackspace v. Microsoft v. Google
    M Mark Jerzykowski

    Having deployed several .Net applications to Azure and AWS (standard type of web app with asp.net, sql server, some background services, some queuing, blob storage, caching, CDN) I'd say that if you're in the .Net world then you'll get a lot more productivity out of Azure (unsurprisingly).

    The Lounge database hosting cloud question career

  • Dapper
    M Mark Jerzykowski

    I use it. We wrote a slightly bigger ORM thing to go on top of it: Dashing[^] And yes, much time was spent on the name.

    The Lounge question

  • Count (Distinct) with left join and group by
    M Mark Jerzykowski

    Hi, Pretty new to Linq and struggling to get my head around it a bit. Here goes.... Survey Tool with a simple (database) hierarchy of: Categories > Sub Categories > Questions > Answers and then another table called SurveyAnswers which basically stores a list of AnswerIds for each survey response. The questions are all multiple choice so you only ever get one SurveyAnswer for each Question (for a particular response). Now, I want to count the number of questions and the number of questions answered for each sub category. In sql:

    select c.CategoryId,
    sc.SubCategoryId,
    COUNT(distinct q.QuestionId) as NumberOfQuestions,
    COUNT(sa.AnswerId) as QuestionsAnswered
    from Category c
    join SubCategory sc
    on c.CategoryId = sc.CategoryId
    join Question q
    on sc.SubCategoryId = q.SubCategoryId
    join Answer a
    on q.QuestionId = a.QuestionId
    left join SurveyAnswer sa
    on a.AnswerId = sa.AnswerId
    and sa.SurveyResponseId = 1
    group by c.CategoryId,
    sc.SubCategoryId

    Any help with showing me how to do this would be great. I can get to the left outer join bit but the select and group bits defeat me! Thanks.

    LINQ database csharp linq help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups