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

mat daus

@mat daus
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need help...asp.net count sql..
    M mat daus

    Thanks ..it works :thumbsup:..

    Database database csharp asp-net help tutorial

  • Need help...asp.net count sql..
    M mat daus

    i will try..im very new to this site.so i dont know how to use forum yet.

    Database database csharp asp-net help tutorial

  • Need help...asp.net count sql..
    M mat daus

    im very new to asp.net.
    i develop a website for e-commerce..now i developing a page to display the statistic of the product that bought by costumer..
    here is my database structure..
    Table Product-ProductID,ProductName,Description
    Table Transaction-TransactionID,User,ProductID,Quantity

    -in table Transaction, i store the product that bought by user with user name and quantity.
    -table product, store the information about product

    -this is my data, assume Bag ProductID=1 and Pencil ProductID=1 in table transaction..
    -for table transaction:
    TransactionID | User | ProductID | Quantity
    1 | ali | 1 | 2
    1 | abu | 2 | 3
    1 | qwe | 1 | 5

    i want make a statistic about the product that bought by users..
    im using this Select query= "SELECT Product.ProductName, COUNT(Transaction.ProductID) AS ProductCount FROM Product INNER JOIN Transaction ON Product.ProductID = Transaction.ProductID GROUP BY Product.ProductName"

    when using this query the result is,
    ProductName | ProductCount
    Bag | 2
    Pencil | 1

    i just want my result shown like i stated below..but i dont know how to do it..
    ProductName | ProductCount
    Bag | 7
    Pencil | 3

    please help me....

    Database database csharp asp-net help tutorial

  • Need help...asp.net count sql..
    M mat daus

    im very new to asp.net.
    i develop a website for e-commerce..now i developing a page to display the statistic of the product that bought by costumer..
    here is my database structure..
    Table Product-ProductID,ProductName,Description
    Table Transaction-TransactionID,User,ProductID,Quantity

    -in table Transaction, i store the product that bought by user with user name and quantity.
    -table product, store the information about product

    -this is my data, assume Bag ProductID=1 and Pencil ProductID=2 in table transaction..
    -for table transaction:
    TransactionID | User | ProductID | Quantity
    1 | ali | 1 | 2
    1 | abu | 2 | 3
    1 | qwe | 1 | 5

    i want make a statistic about the product that bought by users..
    im using this Select query= "SELECT Product.ProductName, COUNT(Transaction.ProductID) AS ProductCount FROM Product INNER JOIN Transaction ON Product.ProductID = Transaction.ProductID GROUP BY Product.ProductName"

    when using this query the result is,
    ProductName | ProductCount
    Bag | 2
    Pencil | 1

    i just want my result shown like i stated below..but i dont know how to do it..
    ProductName | ProductCount
    Bag | 7
    Pencil | 3

    please help me....

    ASP.NET database csharp asp-net 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