Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3930942
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:18:18+00:00 2026-05-19T23:18:18+00:00

I have a Oracle database table like so, which records an item being scanned

  • 0

I have a Oracle database table like so, which records an item being scanned at a scanning point.

ItemsScan
ItemScanId
ItemScanPoint
ItemType
ScanTime

I want to return the ItemScanPoint along with the number of times a specific ItemType was scanned at that ItemScanPoint.

Something along the lines of..

SELECT ItemScanPoint,
       (SELECT COUNT(*) WHERE ItemType = 1),
       (SELECT COUNT(*) WHERE ItemType = 2)
FROM   ItemsScan

How do I do this in oracle?

What is the most efficient way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:18:19+00:00Added an answer on May 19, 2026 at 11:18 pm
    SELECT   ItemScanPoint,
             SUM(CASE ItemType WHEN 1 THEN 1 ELSE 0 END) ,
             SUM(CASE ItemType WHEN 2 THEN 1 ELSE 0 END)   
    FROM     ItemsScan 
    GROUP BY ItemScanPoint
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have an Oracle database table of 40MM 9-digit ZIP codes which
I have a table, users, in an Oracle 9.2.0.6 database. Two of the fields
I have an Oracle database backup file (.dmp) that was created with expdp .
I have an Oracle database and the boolean fields are CHAR(1) with Y/N stored.
I have a Oracle database and one of the fields is a date range
Here's the situation: we have an Oracle database we need to connect to to
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I have a SQL Server 2005 database that is linked to an Oracle database.
I have a number from an Oracle database of 47306832975095894070.85314746810624532. When I bring it
I have a batch file that was created for an Oracle database that I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.