sql - Number of similar columns occurences -


I'm new to SQL Server and need your advice on something. / P>

  I have created a small table with two columns: ** Specific_Bank ** ** Number ** ----------------------------- 31 1 51 2 61 3 71 2 >  

The NUMBER column of the second table, showing the number of events in the bench_id. I have tried this code:

  [dbo]. Select batch_id (batch_id, number) specific [dbo] .big_table.batch_id, (Select number ([dbo] .big_table.batch_id] [Dbo] .big_table [dbo] .big_table   < P> But the correct answer can not be found, I am hoping that with the number of bench_id can you tell me what I am doing? Thank you in advance!   

< Div class = "post-text" itemprop = "text">

You need to be a group BY clause to count the benchID () to use

  include in BATCH_ID (separate_bench), select a specific number of benchID, BATCH_ID     COUNT (*) number from the group

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -