Mongodb Count Distinct Multiple Fields

SQL COUNT Examples. I have three columns used in a table I'm trying to get a distinct count on. You can use columns containing any type of data. no limitation is exceeded. This article shows how to update one or multiple existing documents in a MongoDB database. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. DISTINCT for multiple columns is not supported. Group, Count, and Sort. Hi This is my sample Data set, I need a distinct count of the country and Month Combination by using PowerPivot DAX formulas. js and MongoDB. For more information on expressions, see Expressions. You can use pseudo columns to access additional features from MongoDB. COUNT DISTINCT for multiple columns | Oracle Community. First, we need to unwind the tags array, then group by the tags and sum them up, finally we sort by count. Now the database engine will not have to fetch any data fields, instead it will just retrieve the integer value of 1. Use COUNT and GROUP: 13. Group by was a way to aggregate data. If the Projection clause does not specify the DISTINCT or UNIQUE keyword of the SELECT statement, the query can include multiple COUNT functions that each includes the DISTINCT or UNIQUE keyword as the first specification in the argument list, as in the following example: SELECT COUNT (UNIQUE item_num), COUNT (DISTINCT order_num) FROM items;. In MongoDB, when you execute find() method, then it displays all fields of a document. The general syntax of an aggregate function is: agg_func([ALL | DISTINCT] expr) agg_func is MIN, MAX, SUM, AVG, or COUNT. You may have to register before you can post: click the register link above to proceed. is the name of the output field which has the count as its value. Sign in Sign up. GitHub Gist: instantly share code, notes, and snippets. I'm able to produce a query that will return the results of each one done independently, but want it to return the results of all individually, possibly. Starting in MongoDB 4. 1 - Count (Distinct) with multiple Logical Table Sources. Hi, I have a data set that for every row has 20 procedure codes ie. COUNT DISTINCT for multiple columns | Oracle Community. In a previous article "Automatically filter unique row records from multiple columns", I presented a solution to filter out unique values from several columns. The indexed field must be a UTC datetime or the data will not expire. Count(Distinct)in MS Access by kwan_f · 19 years ago In reply to Count(Distinct)in MS Acce I am using Access 97 and it does not accept Count(Distinct) command when building query. anyways, it seems to be a slow table scan and aggregation framework does the task much faster. Simple MongoDB wrapper. i need perform following tasks on word docx on server side, , believe openxml sdk first place should into. Learn more about Scribd Membership. CountOptions options) Counts the number of documents in the collection according to the given options. it features:fully working android:layout_width: can set wrap_content, match_parent or abritary dp. Solr and ElasticSearch can be easily integrated with MongoDB using Mongo Connector, which comes bundled with plugins for interfacing with each of them. How to get a pivot table to count multiple columns as one data field I need a pivot table to list and tally the Sub-Cat fields as if they were one column: Blue 1. This way, all nodes in the cluster ensure data is consistent between each other. Also, can enable the APPX_COUNT_DISTINCT query option, to make Impala automatically rewrite COUNT(DISTINCT) expressions to NDV(). FROM tables. 2019-09-13T20:18:38+00:00 2019-09-13T20:12:46+00:00. count distinct columns; Distinct Count Multiple Fields; Help creating a query to count Unique (Distinct) Values; need to count no of columns starting with a same column name; how to count rows and columns of integers/doubles in a file? slecting multiple distinct columns. select employee,month,year,count(distinct (holiday_type) from transactions group by employee,month,year I need to use aggregation in mongodb and was created mongo query like this and I have tried something like this and have not completed the count distinct logic here. However, if you are only going to query using common fields there's absolutely no reason not to use a single collection. I want to count the total number of distinct combinations of a, b, c using a select query (i. Distinct Employees in Column 1 2. MongoDB equivalent of an SQL query to get the distinct values of a field in a collection including the count of documents which have each distinct value (distinct with count) - mongodb_distinct_count. Example: COL1 COL2 COL3 M123 M245 M123 M246 M316 M245 i WOULD LIKE MY DISTINCT COUNT OF DATA IN THE THREE COLUMNS TO EQUAL 4. Hi This is my sample Data set, I need a distinct count of the country and Month Combination by using PowerPivot DAX formulas. To pull these queries using MongoDB, we can apply a few different approaches. It works on both numeric and non-numeric data types. Data Governance with Document Validation Implement data governance without sacrificing agility that comes from dynamic schema • Enforce data quality across multiple teams and applications • Use familiar MongoDB expressions to control document structure • Validation is optional and can be as simple as a single field, all the way to every. Re: distinct count on multiple columns theoa Dec 4, 2012 8:41 AM ( in response to nohup ) Try this (untested, since I don't have your table or data). What are the best tools or services for converting a page of a PDF file to an image?. mongodb distinct multiple fields. The SQL COUNT() function is used to return the number of rows in a query. Is there a built-in function to get all unique values in an array field, across all records? arrays,node. By Yashwant Chavan, Views 80838, Last updated on 20-Feb-2019. PyMongo is a Python distribution containing tools for working with MongoDB, and is the recommended way to work with MongoDB from Python. Testgroup)" would create an object that produces a count of the concatenated fields, sadly not a distinct count. is the name of the output field which has the count as its value. Can anyone please help me regarding this. Limiting Documents Represented by a Cursor in the MongoDB Shell. Warning This method uses the bulk insert command to execute the insertion as opposed to the legacy OP_INSERT wire protocol message. I read that to get distinct records for multiple fields, it's better to use map-reduce since distinct only works on single field and group has limitation with size of single bson doc However, I am running into some issue when using map-reduce query to get distinct records or embedded fields:. Consider the following db. It returns the results in an array. I get confused between the cases of 3 "identical bins" case. I use || to count distinct on multiple fields. These fields, called pseudo columns, do not appear as regular columns in the results, yet may be specified as part of the WHERE clause. How to get a distinct count across two different fields. Start studying MongoDB. The table or tables appear in a window in the upper section of the query designer. The next command creates a multivalue field based on the delimiter, which prepares the field for counting by the stats command. Select * with distinct on one field. SUBTOTAL IF Formula To Sum Distinct Values In A Column Jan 2, 2010. Count unique values accross multiple columns that will work when filtered. What I'm looking for is the ability to get a list of valid values to query for, and their counts, so that I can do a guided filter, as you might see on newegg. For an example, see Conditionally Exclude Fields. I have transaction table which is populated by holidays taken by the employees. is the name of the output field which has the count as its value. Delete document from nested array in MongoDB. Does that mean that MongoDB users are out of luck? As it turns out, MongoDB's db. I need to find out distinct count on a column on those files and need the total distinct. Create a Business Objects Measure to Count Distinct Occurrences I have query results for students where a single student id appears in my results multiple time because they can register for classes at multiple campuses in a single semester. If the Projection clause does not specify the DISTINCT or UNIQUE keyword of the SELECT statement, the query can include multiple COUNT functions that each includes the DISTINCT or UNIQUE keyword as the first specification in the argument list, as in the following example: SELECT COUNT (UNIQUE item_num), COUNT (DISTINCT order_num) FROM items;. Expressions are the columns or calculations that you wish to retrieve. Consider the following db. We end up with 4 (instead of 3 as we did when using DISTINCT): Multiple Columns. Usually in Oracle, a group operator (like: count, sum, min, max, avg, etc. The findOne() method returns the first occurrence in the selection. The DISTINCT can come only once in a given select statement. arbitrary step size. Although limited in scope, particularly compared to the aggregation pipeline (page 7) and map-reduce (page 10), these operations provide straightforward semantics for common data processing options. SELECT distinct agent_code,ord_amount FROM orders WHERE agent_code='A002' order by ord_amount; Output: Count() function and select with distinct on multiple columns. how many different users are using Safari for example. This way, all nodes in the cluster ensure data is consistent between each other. We could also split the telemetry data across multiple MongoDB Atlas Collections, based on sensor type, instead of a single collection. The query to create a collection with a document is as follows. I need this number as a calculation, the report doesn't need to display details by employee or date. I'd like to be able to set the Cost Center and Trip Purpose myself, and have a count of all the PNRs that fit those criteria. That command text box is for providing JSON-formatted parameters to whatever command is selected in the drop-down. The name that appears here maps the name of the field as it appears in the PDI transformation with the field that appears in the MongoDB database. MongoDB equivalent of an SQL query to get the distinct values of a field in a collection including the count of documents which have each distinct value (distinct with count) - mongodb_distinct_count. Will present a consistent promised API for both MongoDB and NEDB databases. Count distinct if multiple conditions met. The return document also contains an embedded document with query statistics and the query plan. active oldest votes. I want to know the count of 1s, 2s, 20s across columns C and D (GroupA and GroupB). See how to count unique values in Excel with a formula, and count distinct values automatically in a pivot table. Warning This method uses the bulk insert command to execute the insertion as opposed to the legacy OP_INSERT wire protocol message. js and Mongoose (using aggregation) 12 Oct , 2013 1 Comment Standard Post This post is part 1 of a series of posts I will make regarding Node. The results are sorted in ascending order by city. Mongodb count distinct with multiple group fields. I clean that up by using a DISTINCT. Group by was a way to aggregate data. We can't DISTINCT be used with COUNT(*) in SQL as data will lost. collection/find , and return com. count(): The db. This will give you the distinct count of paperCount for ccName="ATCC" in the results total field. The time to respond to outages is one of the most important metrics to measure, when you have a 24/7 business to run. A common task when cleaning up bad data is to delete all but one of the duplicates, so you. Here, a query can contain multiple instances of NDV(column). Let's look at some examples of using SELECT DISTINCT to see how it works. The Card Design dialog metrics are now divided into two columns: one for MySQL/MariaDB and one for SQL Server: Conclusion In today's blog, we learned how the latest version of Navicat Monitor has evolved to support SQL Server. In this article, we will discuss some of the top MongoDB backup and restore workflows. distinct() method is used to returns an array of documents that have distinct values for the specified field. Count and group: 3. 2019-09-13T20:18:38+00:00 2019-09-13T20:12:46+00:00. I have webserver request logs containing browser family and IP address - so should be able to get a count of different & distinct user-browsers by browser family - i. SQL DISTINCT operator examples Let’s take a look at some examples of using the DISTINCT operator in the SELECT statement. Count MongoDB can return a count of the number of documents that match a query. Use COUNT and GROUP: 13. The distinct count of Gold Medals is 3, Silver medals is 4. 3, “MySQL Handling of GROUP BY”. distinct() considers 1, [1], and 1 as separate values. Distinct count is a very common calculation in any SSAS database—there is a good chance that you already know the DISTINCTCOUNT function, which exists for this purpose. It's a database development, administration and management tool that allows you to simultaneously connect to MySQL, MariaDB, MongoDB, SQL Server, Oracle, PostgreSQL, and SQLite databases. Developing scalable PHP applications using MongoDB operators like count, distinct and distribute the data across multiple servers. Hi, thanks for the answer. The COUNT function returns the total number of values in the specified field. Hello, This is my first post this forum. Some input-only fields are available in SELECT statements. Access - count(iif based on values in 2 fields?. messaging is the table name messageDate is smalldatetime in the format of MM/DD/YY Trying to get count on distinct multiple columns in SQL. If I do a select distinct on it, all three rows are returned (as they should), but is it possible to do a select distinct ignoring a specific column, so it would only return Themes Podcast. You can use count() function in a select statement with distinct on multiple columns to count the distinct rows. I have a report that includes three different columns of data. but when we want to count distinct column combinations, we must either clumsily concatenate values (and be very careful to choose the right separator):. both in counting cars as well as in delivering answers from a database query. I realize my last post revealed too much information and made it confusing. The same action can be logged for the same id several times. Count and group: 3. This is because the DISTINCT option looks for a distinct row, rather than a distinct column. The SQL COUNT function returns the number of rows in a query. If the value of the specified field is an array, db. May be it might help if you explore complex requirements and put it in blog. I have transaction table which is populated by holidays taken by the employees. “select distinct table1. SELECT DISTINCT returns only distinct (different) values. We can count distinct values such as in select count (distinct col1) from mytable;. Please start any new threads on our new site at https://forums. ie in the example above, the custom column would equal 2, as there are 2 procedure codes with. It’s a critical part that needs deserves some housekeeping once in a while. 2 development documentation. However I need a chart where this is counted as one. In a way your problem is fairly easy to solve though not with the exact limiting that you ask for:. So when run the following query, it is expected that an aggregate table will be used. MongoDB equivalent of an SQL query to get the distinct values of a field in a collection including the count of documents which have each distinct value (distinct with count) - mongodb_distinct_count. In each column having different-2 value. Here are a couple of ways to accomplish this. Some input-only fields are available in SELECT statements. You have two ways to do this: The wrong way. Intead, strings are used as keys. runCommand is a helper used to run specific database commands like count. Count Unique values based on multiple columns Deepanshu Bhalla Add Comment Advanced Excel , Excel Unique Values This tutorial explains how to count unique values based on multiple columns in Excel. Defining entities and columns. / SELECT DISTINCT on one column, with multiple columns returned SELECT DISTINCT on one column, with multiple columns returned [Answered] RSS. Consider the following db. DB2: Fetch Distinct Column Along With Multiple Other Columns Select distinct BUCHART from THBSCHNITTSTELLE; (Works Fine) SELECT T. We are going to use the below-shown data to explain the SQL Server Select Distinct with an example. Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and not for commercial use. This is pretty much useless and obvious. Hi, I have a data set that for every row has 20 procedure codes ie. killOp on the operation). Hi, I have a datatable with 4 columns : col1, col2, col3, col4 how can i write a LINQ query to select col1 and col2 and count of col2 values group by col3 and col4 in vb. Study 30 Chapter 11 Multiple Choice flashcards from Juan B. Not all of them. These are the defaults, and will work just fine for our test project. field trip clipart field day clipart baseball field clipart field hockey clipart field hockey stick clipart field hockey images clip. distinct() considers 1, [1], and 1 as separate values. Regards, Pawan. This article shows how to update one or multiple existing documents in a MongoDB database. Indexes Working with indexes in the MongoDB ODM is pretty straight forward. You can count the number of items in a field (a column of values) by using the Count function. batch_size can not override MongoDB’s internal limits on the amount of data it will return to the client in a single batch (i. How to check for multiple attributes in a list python , python-2. Normally if one of the commands executed by a shell script fails it set an exit code different from 0, but the script will not stop. I am attaching a sample. It allows you to quickly visualize and explore your schema to understand the frequency, types and ranges of fields in your data set. Using the Galera Replication Window advisor to avoid SST. Simply add a new Array field named after whatever you would have listed as being acts_as_taggable_on. MongoDB — from “humongous” — is an open source, non-relational, document-oriented database. all the fields in the query are part of an index, and all the fields returned in the results are in the same index. I've seend this topic count multiple distinct fields by group with Mongo But I couldn't make it work with C# driver. distinct(on_fields=('field1','field2')). Hi, I have two columns that have the Employee IDs. Let's look at how you might use the SQLite DISTINCT clause to remove duplicates from more than one field in your SELECT statement. I have webserver request logs containing browser family and IP address - so should be able to get a count of different & distinct user-browsers by browser family - i. Further, we can use the following technique for queries involving a single table in order to produce the same result as multiple COUNT(DISTINCT) expressions:. This will give you the distinct count of paperCount for ccName="ATCC" in the results total field. Using the appropriate plugin, Mongo Connector can integrate data from MongoDB into the desired target system and keep the two systems in sync. i need insert space between stars of ratingbar, example ratingbar well:but need thus:how can this? i don't know if useful anymore, made custom library allows change space beetwen stars programatically , in xml (among other stuff): simpleratingbar. Apart from the basic Excel count unique values formula, you will learn formulas for counting unique names, texts, numbers, cased-sensitive unique values, and more. So, if you now use mongoTemplate. In count version 2 I Included both fields to Count twice and Both as Group By to see the individual Break Downs and how they add up to their Totals. is the name of the output field which has the count as its value. Re: counting distinct based on 2 fields? Ok, forget my question concerning the bar graph, I was really thinking that there might be a new extension I think my expression should be correct if you want a distinct count, taken the dimensions correctly into account. Result could be: There are 1000 unique (distinct) surnames for last name "smith", 500 different surnames for people with last name "schulz" etc. You seem have stumbled upon the top "N" problem. Galera clustering replicates data between nodes synchronously. map/reduce implementation for advanced aggregation; Large file storage using GridFS. See also syntax, parameters, examples and explanation. There are 3 columns used to monitor the non-compliance reason as each file could have multiple non-compliant reasons. Apple kicks ‘stalking app’ Like Patrol off the App Store after it scrapes Instagram users’ data without their consent The app called ‘Like Patrol’ was available on the Apple app store until yesterday It allowed Instagram users to check which posts their friends had liked App’s developer claims it only uses data that is readily […]. Paging Through Documents in a Collection from the MongoDB Shell. if an index on user+type (or date+user+type) will satisfy all your querying needs - there's no reason to create multiple collections. I would like to count distinct session and username group by brandid, the sample sql is like: select brandid,count_distinct(sessionid),count_distinct(username) from data group by brandid I tried to write Mongo DB, my current code is as following and it does not work. Doctrine also supports executing atomic update queries using the `Query\Builder` object. Re: SQL DISTINCT COUNT. Distinct count multiple columns keyword after analyzing the system lists the list of keywords related and the list of websites with related content, in addition you can see which keywords most interested customers on the this website. 2019-09-13T20:18:38+00:00 2019-09-13T20:12:46+00:00. [mongodb-user] Mongodb count distinct with multiple group fields [mongodb-user] Map Reduce to get distinct records for multiple embedded fields [mongodb-user] Querying multiple values from an Array [mongodb-user] Schema design question - multiple DBRef fields and performance [mongodb-user] "Case"-style sort criteria for a collection. x application as it natively handles JSON (BSON) documents. specifying multiple distinct columns in a COUNT() function. Connect to MongoDB and count the total number of documents in a collection. The following instructions assumes that there is a collection "products" which contains documents with the same structure like this one:. SELECT DISTINCT c_salutation, c_last_name FROM customer; You can use DISTINCT in combination with an aggregation function, typically COUNT() , to find how many different values a column contains. WHERE conditions; Explanation of Parameters or Arguments. I've tried using this calc field, but keep getting errors. In a way your problem is fairly easy to solve though not with the exact limiting that you ask for:. Unique values are values that exist only once in a list or cell range. You use a projection to identify the field or property whose maximum value you want. Distinct values of a field in a MongoDB collection or query, specified as a cell array. Although limited in scope, particularly compared to the aggregation pipeline (page 7) and map-reduce (page 10), these operations provide straightforward semantics for common data processing options. com Well the title says it all. When we want to count the entire number of rows in the database table, we can use COUNT (*). 14 for the result. How can I select all fields with a distinct on only one field of that table? On top of this I'd like to sort. In this lesson, aggregate functions are explained by example, providing the reader with a solid foundation that can be applied to empower the database. SQL DISTINCT on Multiple Columns – Learn more on the SQLServerCentral forums So with the Having Count()>1. MongoDB Basics – Finding Distinct Values, Using Sort and Finding the Number of Documents in a Collection In this tutorial we learn about how to use Distinct to find unique fields within a document. no limitation is exceeded. This will be incredibly useful for testing using local files rather than actual MongoDB instances. For retrieval, the actual result type does matter for the sake of conversion and typing. if an index on user+type (or date+user+type) will satisfy all your querying needs - there's no reason to create multiple collections. My gallery shows all the records from my list in which filter statements are true, as follows: Filter(table_name, Filter_A = Column_A And Filter_B =. Support single distinct count on multiple columns. Mongodb aggregate (count) on multiple fields simultaneously. Count distinct. Database Trends Past: “Relational” (RDBMS) Data stored in Tables, Rows, Columns Relationships designated by Primary, Foreign keys Data is controlled & queried via SQL. Mongodb creates databases and collections automatically for you if they don’t exist already. For more information on expressions, see Expressions. On HQL it is not allowed to use subqueries in the from-clause. Defining entities and columns. In a way your problem is fairly easy to solve though not with the exact limiting that you ask for:. SQL DISTINCT on Multiple Columns – Learn more on the SQLServerCentral forums. The columns have duplicate data. You have two ways to do this: The wrong way. See Figure 6. In SQL count(*) and with group by is an equivalent of mongodb aggregation. For an example, see Return Distinct Values for an Array Field. Syntax of distinct() db. However when I then create a count distinct calculation on that combined field , Tableau returns the value 1. thanks! the link ron gave indicate how. Instead use the new Jenssegers\Mongodb\Eloquent\HybridRelations trait. use Jenssegers\Mongodb\Eloquent\Model as Eloquent; class User extends Eloquent {} If you are using hybrid relations, your MySQL classes should now extend the original Eloquent model class Illuminate\Database\Eloquent\Model instead of the removed Jenssegers\Eloquent\Model. Hey Guys, I am having 10-15 column like QA1,QA2,QA3…. The MongoDB\Driver\Command class is a value object that represents a database command. ", the following mongodb command can be used :. Any MongoDB client driver that understands this protocol version should be able to natively connect to Cosmos DB. GROUP BY simply groups multiple rows with the same value in the grouped column in a single row. mongodb distinct multiple fields: gistfile1. My goal is to select records (all fields) based on the t_name being distinct. For an example, see Return Distinct Values for an Array Field. runCommand is a helper used to run specific database commands like count. Add New Fields or Reset Existing Fields ¶. The results are sorted in ascending order by city. field-name is the name. so requirements follows:look specific text in documentadd comment in location of found text. select employee,month,year,count(distinct (holiday_type) from transactions group by employee,month,year I need to use aggregation in mongodb and was created mongo query like this and this gives me wrong solution. Answer by jeffland. It's a database development, administration and management tool that allows you to simultaneously connect to MySQL, MariaDB, MongoDB, SQL Server, Oracle, PostgreSQL, and SQLite databases. I have uploaded a new patch which fixes the handling of multiple fields in a DISTINCT ON query as well as the count method for DISTINCT ON queries and resolves the qouting issues. If no top-level _id field is specified in the document, MongoDB automatically adds the _id field to the inserted document. The SQL COUNT function returns the number of rows in a query. And we use the dot notation like cachedContents. DISTINCT operates on a single column. These fields, called pseudo columns, do not appear as regular columns in the results, yet may be specified as part of the WHERE clause. Although limited in scope, particularly compared to the aggregation pipeline (page 7) and map-reduce (page 10), these operations provide straightforward semantics for common data processing options. Get GROUP BY for COUNT: 9. Definition: The DISTINCT clause acts as a filter to remove duplicate records from a result set. The advantages in the tabular model with the distinct count are: You do not need to create, process and maintain separate partitions and measures for the distinct count as you do in multidimensional models. 1 is used for ascending order while -1 is used for descending order. ", the following mongodb command can be used :. Excel countif to Count unique values in a column Learn to count the number of unique values in a column using Countif formula in MS Excel. is possible openxml sdk? tried go through docs, , found way search , replace text, couldn't find way add comment in appropriate location. If there were multiple documents with the same value db. I usually do this using a hash collection approach that ends up with distinct entities of each type in a collection based on a key value. it features:fully working android:layout_width: can set wrap_content, match_parent or abritary dp. Ingredients will be repeated in column A as they are in multiple Formulations (column b), but I want to return all the possible formulations that contain one ingredient. exe (for Windows users). 2, if the client that issued the db. count() is most basic. I need a query that will count the number of occurences of more than one item in a field. Distinct("symbol", new BsonDocument())?. Ask Question Asked 5 months ago. Fri, 30 Jun 2017. I have started mongodb couple of weeks back. I have a report that includes three different columns of data. Although limited in scope, particularly compared to the aggregation pipeline (page 7) and map-reduce (page 10), these operations provide straightforward semantics for common data processing options. The specification of Stage 2 states that the output of this stage will be documents that have an “_id" with a distinct zip code as a value and so will group together documents input to this stage that have the same zip code, and a “totalUnits" field whose value is the sum of all the "units" field values from each of the documents in the group. distinct() helper as well:. Tutorial Start here for a quick overview. May be it might help if you explore complex requirements and put it in blog. Defining entities and columns. Learn vocabulary, terms, and more with flashcards, games, and other study tools. If the value of the specified field is an array, db. com Well the title says it all. File storage [ edit ] MongoDB can be used as a file system , called GridFS , with load balancing and data replication features over multiple machines for storing files. We could also split the telemetry data across multiple MongoDB Atlas Collections, based on sensor type, instead of a single collection. The cell array can contain numeric scalars for numeric data, character vectors for text data, and structures for nested documents. MongoDB can run over multiple servers, balancing the load or duplicating data to keep the system up and running in case of hardware failure. For example: SELECT DISTINCT last_name, first_name FROM employees; This SQLite DISTINCT clause example would return each unique last_name and first_name combination from the. COUNT DISTINCT for multiple columns | Oracle Community Community. is the name of the output field which has the count as its value.