Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

zenVentzi zenVentzi

🏠
Working from home
  • Varna, Bulgaria
View GitHub Profile
View bla.ts
import styled from "styled-components";
import React, { useRef, useLayoutEffect, useState } from "react";
import ReactDOM from "react-dom";
import shortid from "shortid";
// https://stackoverflow.com/a/42337722/4132182
function getNodeIndex(element: Element) {
if (!element.parentNode) {
throw Error("parent node not found");
}
View TSQL_09 Telerik
USE TSql
GO
/*1 Create a database with two tables: Persons(Id(PK), FirstName, LastName, SSN)
and Accounts(Id(PK), PersonId(FK), Balance). Insert few records for testing.
Write a stored procedure that selects the full names of all persons.*/
CREATE TABLE Persons
(
[Id] INT IDENTITY,
View ADVANCED_SQL_8
USE TelerikAcademy
--1. names and salaries of the employees that take the minimal salary
--use nested SELECT
SELECT FirstName, Salary FROM Employees
GROUP BY FirstName, Salary
HAVING Salary = (SELECT MIN(Salary) FROM Employees);
--2. find the names and salaries of the employees that have a salary
--that is up to 10% higher than the minimal salary for the company.
View INTRO_TO_SQL_7
USE TelerikAcademy
SELECT *FROM Employees
SELECT FirstName + '.' + LastName + '@telerik.com' AS [Full Email Adress] FROM Employees
SELECT DISTINCT Salary FROM Employees
SELECT FirstName, JobTitle FROM Employees
WHERE JobTitle = 'Sales Representative'