Writing an sql query for name of the youngest student(s) from the ‘Computer Science’ department along with the total marks obtained by him (them).”

I have been given a table of students data and I have to write query for the following:

Retrieve the name of the youngest student(s) from the ‘Computer Science’ department along with the total marks obtained by him (them).

The database schema are as follows:

depts( deptcode char(3) primary key, deptname char(70) not null); 
students( rollno number(2) primary key, name varchar(50), bdate date check(bdate < TO_DATE('2004-01-01','YYYY-MM-DD')), deptcode char(3) references depts(deptcode) on delete cascade, hostel number check(hostel<20), parent_inc number(8,1)); 
crs_regd( crs_rollno number(2) references students(rollno) on delete cascade, on delete cascade, marks number(5,2), primary key(crs_rollno)); 

I wrote the query as

select name, bdate, sum(marks) from students s inner join crs_regd c on s.rollno=c.crs_rollno inner join ( select name, min(bdate) as bdate from students st, depts d where st.deptcode=d.deptcode and d.deptname="Computer Science") x on x.name=s.name and x.bdate=s.bdate; 

but it gives the error as identifier is too long in the line

where st.deptcode=d.deptcode and d.deptname="Computer Science") x

I think the problem is in joining the join of two tables with already joined two tables as the error points out. Correct me if I am wrong. If the query is incorrect please inform.

Also, if there is a way to write this query please discuss. If any other information needed please drop a comment below.

How can I filter SharePoint Search results based on the current user’s department?

We’re on SharePoint online, and user profiles are synced to SharePoint.

I have a number of libraries that I want users to be able to search, but I want to restrict the documents that specific departments (Sales) can see to those that they have modified, created (author), or are identified in People type fields. For any users outside of those specific departments, I want it to be the full search.

I have the user section working properly (current user is associated to the record), but I am having trouble filtering the whole search based on the current user’s department.

Re-creating the library or manually setting permissions aren’t options at this point due to size (<900k documents) and business restrictions (actively being used in production), so I’m limited to constraining via search right now.

Any/all help is welcome! My search results query is below.

{searchTerms} (       ListID:{removed for security} OR ListID:{removed for security} OR ListID:{removed for security}     )  AND (       (         (           {User.Department}="Commercial Sales - Healthcare"             OR {User.Department}="Commercial Sales"             OR {User.Department}="Commercial Sales - Enterprise"             OR {User.Department}="Federal Sales - Healthcare"             OR {User.Department}="Federal Sales - Civilian"             OR {User.Department}="Federal Sales - DOD"             OR {User.Department}="SLED Sales"         ) AND (           Author={User.Name}           OR ModifiedBy={User.Name}           OR ISAM={User.Name}           OR Salesperson={User.Name}         )       ) OR (         (           {User.Department}<>"Commercial Sales - Healthcare"             AND {User.Department}<>"Commercial Sales"             AND {User.Department}<>"Commercial Sales - Enterprise"             AND {User.Department}<>"Federal Sales - Healthcare"             AND {User.Department}<>"Federal Sales - Civilian"             AND {User.Department}<>"Federal Sales - DOD"             AND {User.Department}<>"SLED Sales"         )       )     ) 

Where can I contact the shipping department of VFS – New York scanning hub?

I applied for a UK standard visitor visa.

I sent my application myself using USPS with a return shipping label from USPS inside the package. I was informed by VFS from the email address:

nyscanhub.labels@vfsglobal.com

that they cannot send back my passport using USPS and I need to send a UPS return label. I replied back to that email with a UPS shipping label. My co-worker also applied for the same visa, had sent a USPS shipping label and she wrote a fresh email to the same email address as above and she received her passport today.

My tracking number on UPS says ‘Label created’ (which means they haven’t even handed it UPS yet).

Where can I contact someone/anyone from VFS to get an update ?

More info:

I applied for a Standard Visitor’s visa for the UK from the US. I am a permanent resident in the US. I had my biometrics appointment at the Application Support Center in San Fernando, California.

Rust book chapter 8 department challenge

I am just starting my journey in to rust and will gladly accept any feedback you can give me. This is the third exercise in the Rust book chapter 8.

src/main.rs

use std::collections::HashMap; mod commands;  fn main() {     let mut departments: HashMap<String, Vec<String>> = HashMap::new();     println!("Welcome to Rust IFS");     loop {         commands::print_menu();         let mut input = String::new();         std::io::stdin()             .read_line(&mut input)             .expect("Invalid input");         if input.to_lowercase().contains("q") && input.len() <= 5 {             break;         } else if input.to_lowercase().contains("add") && input.to_lowercase().contains("to") {             println!("{}", commands::add_user(&mut input, &mut departments));         } else if input.to_lowercase().contains("list") && input.len() == 5 {             commands::print_users(&mut input, &mut departments);         } else if input.to_lowercase().contains("list") && input.len() > 5 {             commands::print_users_by_department(&input, &mut departments)         } else {             println!("\nInvalid input");         }         println!("Press Enter to continue...");         commands::pause();     } } 

src/commands.rs

use std::collections::hash_map::Entry; use std::collections::HashMap; use std::io::Read;  pub fn add_user(input: &mut String, departments: &mut HashMap<String, Vec<String>>) -> String {     let split: Vec<&str> = input.split_whitespace().collect();      if split.len() == 4 && split[0].contains("add") && split[2].contains("to") {         if departments.contains_key(split[3]) {             match departments.entry(String::from(split[3])) {                 Entry::Vacant(e) => {                     e.insert(vec![String::from(split[1])]);                 }                 Entry::Occupied(mut e) => e.get_mut().push(String::from(split[1])),             }              String::from("Success!")         } else {             departments.insert(String::from(split[3]), vec![String::from(split[1])]);              String::from("Success!")         }     } else {         String::from("Invalid input")     } }  pub fn print_menu() {     println!("Type: add [name] to [department] to add an employee to a department");     println!("Type: list users to list all users");     println!("Type: list [department] to list all users in department");     println!("Type Quit to quit"); }  pub fn pause() {     std::io::stdin().read(&mut [0]).expect("Invalid input"); }  pub fn print_users(input: &mut String, departments: &mut HashMap<String, Vec<String>>) {     let split: Vec<&str> = input.split_whitespace().collect();     if split.len() == 1 {         for department in departments {             department.1.sort();             println!("{}:", department.0);             for name in department.1 {                 println!("{}", name)             }         }     } }  pub fn print_users_by_department(input: &String, departments: &mut HashMap<String, Vec<String>>) {     let split: Vec<&str> = input.split_whitespace().collect();     if split.len() == 2 {         for department in departments {             department.1.sort();             if department.0 == split[1] {                 println!("{}:", department.0);                 for name in department.1 {                     println!("{}", name)                 }             }         }     } } ``` 

Got promoted to head content department but still don’t know my title (or pay)

I’ve been working at this small digital agency (15 employees, about 50 clients) for 8 months. I was hired as a copywriter, but about 2 months ago, I was promoted to “run the content department” (quoting my direct manager). This comes with a lot of new responsibilities:

  • Head of the content department. The only other person that deals with content is a writer who reports to me, so any decision involving content strategy (including brand and tone) for all clients is mine.

Got promoted to head content department but still don’t know my title (or pay)