Two accounts in a motion with opposition where the criteria

I have two separate queries that work fine by themselves but I need them to work in one query. I can combine the results easily enough in excel but this is to be part of a larger query. The two separate queries are: SELECT SiteProductVariation.Produc

documents with tags in mongodb

I have a collection1 of documents with tags in MongoDB. The tags are an embedded array of strings: { name: 'someObj', tags: ['tag1', 'tag2', ...] } I want to know the count of each tag in the collection. Therefore I have another collection2 with tag

How to count punctuation in a string in java?

I need to write a program to count certain punctuation marks in a string. I have this code I thought would work, but at every charAt, i have an error that says the left hand of the assignment must be a variable. Need help fixing this public static vo

Using COUNTIFS for a series of values ​​at a time

Working a step higher then COUNTIFS, I appose a challenge to write a formula without VBA code. The basic data is combined from 1000s of rows with: Column A: rows with values from 1 to 3 Column B: rows with values from 1 to 250. For this purpose lets

Count in the SQL server

select hotel.hotel_name 'Hotel Name', Address 'Address', Description 'Description', Contact_No 'Contact Number' from hotel, customer_profile, booking_details where = and hotel.hotel_name = booking_details.

Find most cases of a month

So this is pretty much the table (already narrowed down the desired columns) DATEREGIS: 10-AUG-95 02-MAY-01 12-NOV-98 09-OCT-99 12-NOV-98 2-NOV-00 12-AUG-01 and what I am trying to do is create a query to find the busiest month. This is what I have r

C ++ table, counting repetitions in a function

I've been learning c++ recently (coming from java) and I am attempting to count the number of repeating values in an array. For some reason the array is not being properly passed to my counter function. #include <iostream> #include <time.h> us

Count the keys redis without looking for them in Ruby

I'm keeping a list of online users in Redis with one key corresponding to one user. Keys are set to time out in 15 minutes, so all I have to do to see how many users have roughly been active in the past 15 minutes, I can do: redisCli.keys('user:*').c

How to number each line returned from mysql as they return

So What I want to do is to echo 1 for the first row that is returned and two for the 2nd one and so one, Please I just don't know how to phrase this, I don't want to just count rows from mysql table, I want to give each row a number automatically and

How can I group an array of objects by month?

I'm using JavaScript. I have an array that contains data in this format: [ {"USER_NAME":"User1","LAST_SUCCESSFUL_CONNECT":"1373978337642"}, {"USER_NAME":"User2","LAST_SUCCESSFUL_CONNECT"

SQL: How to get a unique account from unique entries?

Simple SQL question, I searched but can't seem to find the answer already asked. I want to query the names, and then the count of unique url per each name. Input: NAME URL John John John Bob Bob twitter.c

Count on automatic C ++ enum

I've come to a pattern when writing enums in C++. It is like this: class Player { public: class State { public: typedef enum { Stopped, Playing, Paused }PossibleValues; static const int Count() {return Paused+1;}; static const PossibleValues Default(

Counting the number of rows displayed in a table in Access

I'd like to show how many times a name appears in a field in an Access 2003 table. here's the table structure and content: I used this example here: Tabel: 1 - Name1 1 - Name2 2 - Name1 2 - Name3 3 - Name1 3 - Name2 Result Name1 - 3 Name2 - 2 Name3 -

Dictionary in VB.NET Get Consolidated Keys

Hi I have this dictionary.. Dim Rooms As New Dictionary(Of Integer, Of Integer) Rooms(1) = 101, 102, 109, 110 Rooms(2) = 103, 104, 105 Rooms(3) = 106, 107 I want to know if i can obtain how many keys are in the dictionary For example, in this diction

Count from another table [mysql]

I have one table like this: +----+---------+-------------+ | id | site_id | search_term | +----+---------+-------------+ | 1 | 2 | apple | | 2 | 2 | banana | | 3 | 3 | cheese | | 4 | 1 | aubergine | +----+---------+-------------+ And another like thi

The fastest way to count a collection while applying criteria

I have a dictionary that i have already loaded form the database which contains a customer oject key and a Status value which is an Enum. What I would like to do is to count all the items in the dictionary which have a status of a certain enum type i

Simple SQL query datetime count queries drive me crazy!

Thank you to anyone that can help. I am using MSSQL 2005 I have a database like so SegmentDT DateTime, WhoCalled varchar(4) All I want to do is find all of the WhoCalled that have a count of calls within 5 minutes of each other. How can I accomplish

How many times has the program worked? C #

How can I get the number of times a program has previously run in C# without keeping a file and tallying. If it is not possible that way, can it be gotten from the Scheduled Task Manager? To C. Ross: how would this be done in a registry setting? forg

php count () to help give html attributes

I am building a menu that I want to display in a certain way. However, it is to be populated from a database so it cannot be hard-coded. Essentially I want the <li> tags to appear in set places when they are created and was hoping that I could set t