Sort by group key - sql-order-by

How can sort grouped data by a key field while creating a slice in superset?
In a dropdown I see only metrics to sort by, no key field presented.

Related

How to use values from a list aggregated field in a table to a filter in Quicksight?

I have a dashboard in Quick-sight where a table is being used which contains a field that has values list aggregated.(Please refer the attached image).
I need to create a filter in a dashboard that will have a dropdown with distinct values from the list aggregated values so that if i select/check a particular value from a dropdown then it should filter out the list aggregated record by matching the string i selected in a drop down.
I tried to use the split function to get the distinct values from the list aggregated values from the field. However, the filter did not work as i expected.
Please suggest possible solution. Will appreciate any suggestions.

Sorting Mongo records on non unique created date time field

I am sorting on created field which is in the form of 2022-03-26T03:56:13.176+00:00 and is a representation of a java.time.LocalDateTime.
Sorting by only created is not consistent as the field is not unique, due to batch operations that run quickly enough to result in duplicates.
I've added a second sort, on _id, which is ObjectId.
It seems the second sort adds quite a bit of time to the query, more so than the first, which is odd to me.
Why does it more than double response time, and is there a more preferred way to ensure the order?
Using MongoTemplate, I sort like this:
query.with(Sort.by(Sort.Order.desc("createdOn"), Sort.Order.desc("_id")));
If your use case is always to sort in descending order on both fileds it is best to create the compound index in the expected sort order as follow:
db.collection.createIndex({ createdOn:-1,_id:-1 })
But in general the default _id field is containing the document insertion date and it is unique accross mongodb process so you may just sort based on _id , you most porbably don't need to sort additionally on createdOn date ...

Quicksight control to include nulls

I have a quicksight dataset where one of the data fields is routingtype which can be filled with "Agent_direct", "agent_select" and "null" as the values. I have created a parameter and filter linked to the parameter but when I create the control and link it back to the dataset and routingtype field I am unable to filter by null values in the control. Is there a way to include those in the control?routing type control

Distinct Values for one field with corresponding fields in elasticsearch

I want the corresponding query in Elastic for
SELECT DISTINCT(color),car_price FROM cars;.
I have gone through below given link . which is having only field in buckets as key but I need corresponding fields with key in buckets.

Sort view based on weight of taxonomy vocabulary inside field collection

I got a view to list a content type (Say faculty). Among many fields, I have a field collection (Say position) which got a Designation field (Taxonomy Vocabulary).
Now I need an exposed filter criteria and sort criteria to sort the entire content based on this Designation inside this field collection.
By adding a relationship, I managed to apply the filter using "Designation", But I am unable to sort the content using the weight of this "Designation" taxonomy.
Note: Sort by taxonomy name is working. The problem is sorting with the weight of taxonomy.

Resources