F

@fran279

user_input

C#
1 year ago
using System; using System.Text; /* User interface contains two types of user input controls: TextInput, which accepts all characters and NumericInput, which accepts only digits. Implement the class TextInput that contains: Publi

enum_wtih_flags

C#
1 year ago
// The [Flags] attribute should be used whenever the enumerable represents a collection of possible values /* Each account on a website has a set of access flags that represent a users access. Update and extend the enum so that it cont

agregation_avg

SQL
1 year ago
/* App usage data are kept in the following table: TABLE sessions id INTEGER PRIMARY KEY, userId INTEGER NOT NULL, duration DECIMAL NOT NULL Write a query that selects userId and average session duration for each user who has more tha

table_with_foreign_key

SQL
1 year ago
/* The following two tables are used to define users and their respective roles: TABLE users id INTEGER NOT NULL PRIMARY KEY, userName VARCHAR(50) NOT NULL TABLE roles id INTEGER NOT NULL PRIMARY KEY, role VARCHAR(20) NOT NULL

inner_join_itself

SQL
1 year ago
/* The following data definition defines an organization's employee hierarchy. An employee is a manager if any other employee has their managerId set to the first employees id. An employee who is a manager may or may not also have a manager.

inner_join

SQL
1 year ago
/* Each item in a web shop belongs to a seller. To ensure service quality, each seller has a rating. The data are kept in the following two tables: TABLE sellers id INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL, rating INTEGER NOT NULL

joins_queries

SQL
1 year ago
/* Information about pets is kept in two separate tables: TABLE dogs id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(50) NOT NULL TABLE cats id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(50) NOT NULL

example_update

SQL
1 year ago
--UPDATE /* A table containing the students enrolled in a yearly course has incorrect data in records with ids between 20 and 100 (inclusive). TABLE enrollments id INTEGER NOT NULL PRIMARY KEY year INTEGER NOT NULL studentId INTEGER NO

examples_sql

SQL
1 year ago
-- create a table CREATE TABLE students ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, gender TEXT NOT NULL ); -- insert some values INSERT INTO students VALUES (1, 'Ryan', 'M'); INSERT INTO students VALUES (2, 'Joanna', 'F'); -- fetch some val