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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

templarx

@templarx
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • select with TOP and COUNT
    T templarx

    Or you can try something like this: SELECT sub.surname,count(*) as count FROM (select top 5 surname from myTable) sub GROUP BY sub.surname --[WHERE surname = 'CRUZ'] OUTPUT will bev [without the where clause] CRUZ 3 TOM 1 JACK 1 if you want to see all 5 rows [basically repeating ] SELECT sub3.surname,sub2.count FROM (select count(*) as count from (select top 5 surname from myTable where surname = 'CRUZ') sub) sub2 CROSS JOIN (select top 5 column_name from myTable where surname = 'CRUZ' ) sub3

    Database database help
  • Login

  • Don't have an account? Register

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