Questions tagged [group]

585 questions
-2
votes
2 answers

Change owner and group of all files and directories

I tried changing the owner and group of all files and directories Vincent and staff respectively in my terminal but its not working. I tried using chown -R Vincent:staff*...
-2
votes
1 answer

How to initialise values in one table with a group by from another table in sql

I need to use create a column in one table and set the values in the column as groups based on values in another table. I keep getting this error: ORA-01427: single-row subquery returns more than one row And this one: ORA-01400: cannot insert…
-2
votes
1 answer

how to take different strings from an array to form a new array js

var course = ["HTML", "CSS", "JAVASCRIPT", "PYTHON"] var student = { name: "john doe", course } { name: "gary lary", course } I want the output to be group1 [html css javascript python] john doe is assigned html gary lary css and so on
yerin
  • 1
-2
votes
1 answer

Grouping previous value in excel

I need the formula to create the Mapping column in the below table Id Name Group Mapping 1 Tyson1 A Tyson1 2 Tyson2 B Tyson2 3 Tyson3 C Tyson3 4 Tyson4 C Tyson 3, Tyson 4 5 Tyson5 D Tyson5 6 Tyson6 F Tyson6 7 Tyson7 C Tyson 3,…
-2
votes
1 answer

Group similar data and assign number to each group Python pandas

I have a dataset having 25 columns and 1000+ rows. This dataset contains dummy information of interns. We want to make squads of these interns. Suppose we want to make each squad of 10 members. Based on the similarities of the intern we want to make…
-2
votes
1 answer

Group by Id with greatest value

I have a simple table where I'm calculating a "level value" dynamically via SELECT with repeated Ids in this table, what I'm trying to do is to Group the rows Ids by the greatest level value. Fiddle:…
Yonier
  • 31
  • 5
-3
votes
1 answer

Hardcore sorting quest in mySQL query

I have a table "test": ID | NAME | DATETIME ---+------+----------------------- 1 | a1 | 2023-05-01 01:00:00 2 | a2 | 2023-05-01 02:00:00 3 | a3 | 2023-05-01 03:00:00 4 | b1 | 2023-05-02 01:00:00 5 | b2 | 2023-05-02 02:00:00 6 | b3 …
Jim Hopper
  • 13
  • 1
  • 4
-3
votes
3 answers

Best way to count a distinct row grouped by a different row?

DB is BigQuery, but it's very similar to most DB's, and I would imagine this answer will be universal. The Table user_id | date | category_id ---------------------------- 1 | xx | 10 2 | xx | 10 2 | xx | 10 3 | xx |…
Trip
  • 26,756
  • 46
  • 158
  • 277
-3
votes
1 answer

How to access subgroup in list with Python

I have a list with subgroups within. I made subgrouping based on similarity of fund name. How do I select/identify a group within a list? mylist = [ {'American Funds Cnsrv Gr & Inc A', 'American Funds Cnsrv Gr & Inc R-5E', 'American Funds Cnsrv…
Evan
  • 41
  • 4
-3
votes
1 answer

Java regular expression is validating the date in ddMMMyyy but not validating yyyy-MM-dd

I want to validate different kinds of strings which are of different format like 10JUN2022, 2Mx1D, 4M, 1D, TEN, ONE|TEN etc.. and I have written regular expression for that '''^([0-9A-WYZa-wyz ]+)([xX|]([0-9A-WYZa-wyz ]+))?$''' and it's working fine…
dilipyadav
  • 53
  • 7
-3
votes
3 answers

SQL Query group by for a beginner

I'm quite new to SQL Server and was wondering if it was possible to run a query like this. I have a table with the following fields: USER, WORKSTATION, DURATION (seconds) Each USER can use multiple workstations and each workstation can be used by…
DearS
  • 182
  • 2
  • 11
-4
votes
2 answers

How to find keys from undefined schema

Suppose I have following array array = [ { optionA: "QA1", optionB: "QB1", optionC: "QC1", optionD: "QD1", }, { optionA: "QA2", optionB: "QB2", optionC: "QC2", optionD: "QD2", optionE: "QD2", }, { optionA: "QA3", optionB:…
1 2 3
38
39