text
stringlengths
6
9.38M
/*==============================================================*/ /* Table : rolefonctionnalite */ /*==============================================================*/ create table rolefonctionnalite ( IDFONCTIONNALITE int not null, IDROLE int not null, p...
insert into gcm_users(role, status, phone, adviser, login_at) values('Dependant', 'paired', '642a', '642b', now()); insert into gcm_users(role, phone, login_at) values('Adviser', '642b', now()); insert into approvalstatus(adviser, dependantName, dependantPhone, status, time) values('642b', 'AdviseeForUserStudy', '642a'...
CREATE TABLE monitoringResults ( id INT NOT NULL AUTO_INCREMENT, endpointId INT NOT NULL, userId INT NOT NULL, checkedAt DATETIME NOT NULL, httpCode INT NOT NULL, payload LONGTEXT NOT NULL, PRIMARY KEY (id), INDEX index_endpoint_dd (endpointId) ) DEF...
USE ImmoDB; DROP Table if exists Annonce; Create Table Annonce( id varchar(80) primary key, title varchar(150) not null, link text not null, piece int, room int, surface decimal(5, 2), price decimal(5, 2), currency varchar(5), price_updated_date datetime, city ...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 12, 2018 at 01:13 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
INSERT INTO `disease` VALUES ('1', '1', '1', '1', '1', '1'); INSERT INTO `disease` VALUES ('Stomachache', 'pain_stomache', 'wrong eating', '无', 'right eat', 'pin_undersws');
-- Replace XX with your initials or other unique identifier insert into services (id, name, description, bindable) values ('XX', 'XX-HaaSh', 'HaaSh - HashMap as a Service', true) insert into plans (id, name, description, service_id) values ('XX', 'basic', 'Basic Plan','XX');
-- GENERATE TEMP TABLES FOR SCORES IMPUTATION drop table if exists il_bg_avgs; create temp table il_bg_avgs as select substring(vb_reg_census_id, 1, 12) as bg_id , avg(coalesce(vb_voterbase_age,vb_vf_age)) as age , avg(ts_tsmart_college_graduate_score) as ts_tsmart_college_graduate_score , avg(ts_tsmart_high_school_o...
DROP TABLE IF EXISTS Session; DROP TABLE IF EXISTS HourType; DROP TABLE IF EXISTS Interviewer; DROP TABLE IF EXISTS Supervisor; CREATE TABLE HourType( ID INT AUTO_INCREMENT PRIMARY KEY, HourTypeName VARCHAR(80) NOT NULL, Ratio float NOT NULL ) ; CREATE TABLE Supervisor( ID INT AUTO_...
-- This lists all the tables of a database in your MySQL server SHOW TABLES;
delete from cart where product_id = $1; select * from cart join products on cart.product_id = products.id order by products.id
-- select * from users where first_name like 'fa%' and last_name like 'ca%'; -- explain format = json select * from users where first_name like 'fa%' and last_name like 'ca%'; -- create index users_first_last on users (first_name(5), last_name(5));
drop table steptwo; drop table stepfour; drop table stepthree; drop table tfidf; create table steptwo(docid STRING, term_count INT) row format delimited fields terminated by '\t'; load data inpath '/user/training/data-output/doc-length/part-00000' into table steptwo; create table stepthree(docid STRING, term STRING, ...
DROP TABLE IF EXISTS `XXX_papoo_news_impressum`; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_news_user`; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_newsletter`; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_newsletter_messages`; ##b_dump## DROP TABLE IF EXISTS `XXX_papoo_news_imp_lang`; ##b_dump## DROP TABLE IF EXISTS `XXX...
/** * SQL for insert FR_SHISETSU_IP_TEL_NO for reflect shisetsu plan to From * @author TuyenVHA * @version $Id: ShisetsuDashboardService_insertFrShisetsuIpTelNo_Ins_01.sql 21156 2014-08-15 04:15:43Z p__toen $ */ INSERT INTO FR_SHISETSU_IP_TEL_NO FSITN ( FSITN.SHISETSU_CD ,FSITN.SHISETSU_IP_TEL_NO_NO ,FS...
SELECT * FROM ecommerce_database.PRODUCT WHERE PRODUCT.Seller = ?;
--查询7839的姓名和薪水 set serveroutput on declare --定义变量保存姓名和薪水 --pename varchar2(20); --psal number; pename emp.ename%type; psal emp.sal%type; begin --得到姓名和薪水 select ename,sal into pename,psal from emp where empno=7839; dbms_output.put_line(pename||'的薪水是'||psal); end; /
--20. `top_agent.sql`: --Which sales agent made the most in sales over all? SELECT Top 1 Employee.FirstName + ' ' + Employee.LastName AS 'Sales Agent', SUM(Invoice.Total) AS 'Total Sales' FROM Invoice JOIN Customer ON Customer.CustomerId = Invoice.CustomerId JOIN Employee ON Employee.EmployeeId = Cus...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 22 apr 2020 om 11:00 -- Serverversie: 10.4.11-MariaDB -- PHP-versie: 7.2.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
DROP TABLE IF EXISTS b_tasks; DROP TABLE IF EXISTS b_tasks_dependence; DROP TABLE IF EXISTS b_tasks_file; DROP TABLE IF EXISTS b_tasks_member; DROP TABLE IF EXISTS b_tasks_tag; DROP TABLE IF EXISTS b_tasks_template; DROP TABLE IF EXISTS b_tasks_template_dep; DROP TABLE IF EXISTS b_tasks_viewed; DROP TABLE IF EX...
drop table if exists child_surrogate; drop table if exists child_natural; drop table if exists parent_1; drop table if exists parent_2; create table parent_1 (id int not null primary key); create table parent_2 (id int not null primary key); create table child_surrogate ( id int identity(1, 1), parent_1_id int ...
DROP DATABASE IF EXISTS projdb; CREATE DATABASE projdb; USE projdb; CREATE TABLE `Users`( `id` MEDIUMINT(11) NOT NULL AUTO_INCREMENT, `username` VARCHAR (25), `email` VARCHAR (25) NOT NULL, `about` TEXT, `name` VARCHAR (25), `isAnonymous` BOOL NOT NULL DEFAULT False, PRIMARY KEY (`id`), UNIQUE KEY USIN...
INSERT INTO cloth ( vendor_code, weaving_pattern, decoration_pattern, color, length, arrival_date, podgr_pattern ) SELECT vendor_code, weaving_pattern, decoration_pattern, color, sum( length) AS length, arrival_date, podgr_pattern FROM cloth_full WHERE length > ...
-- Table: public.url_list -- DROP TABLE public.url_list; CREATE TABLE public.url_list ( id SERIAL PRIMARY KEY, url character varying(512) COLLATE pg_catalog."default", created_at timestamp without time zone, visited_at timestamp without time zone ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; AL...
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le: Dim 26 Mai 2013 à 17:12 -- Version du serveur: 5.5.27-log -- Version de PHP: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
--Exercise 21 /*Provide a query that shows the count of customers assigned to each sales agent.*/ select Employee.FirstName || ' ' || Employee.LastName 'Sales Agent', count(Customer.SupportRepId) '# Assigned Customers' from Employee, Customer where Employee.EmployeeId = Customer.SupportRepId group by Employee.Emp...
#1a) Find the products which use the maximum quantity of materials in terms of quantity required (list only the top 3). (use tables: product_t, uses_t, rawmaterial_t). use bigpvfc; select product_t.productid, productdescription, sum(quantityRequired) as maxiumQuantityRequired from product_t inner join uses_t on p...
CREATE TABLE `task` ( `task_rowid` int(11) NOT NULL AUTO_INCREMENT, `list_rowid` int(11) NOT NULL, `title` varchar(255) NOT NULL, `isComplete` tinyint(4) NOT NULL DEFAULT '0', `isAlarm` tinyint(4) DEFAULT '0', `note` text NOT NULL, PRIMARY KEY (`task_rowid`), KEY `task_list_idx` (`list_rowid`), CONSTR...
DELIMITER $$ DROP TRIGGER if exists contrainte_employe $$ CREATE TRIGGER contrainte_employe BEFORE INSERT ON culture FOR EACH ROW BEGIN DECLARE to_verify smallint(5) unsigned; SELECT fkposte INTO to_verify FROM employe INNER JOIN culture on employe.idemploye = new.fkemploye GROUP BY employe.fkpo...
SELECT p.Product_Name, b.Brand_Name, p.Product_Price FROM YeovilHealthcare.Product AS p INNER JOIN Brand AS b ON b.Brand_ID = p.Brand_ID INNER JOIN product_keyword AS pk ON p.Product_ID = pk.Product_ID INNER JOIN keyword AS k ON pk.Keyword_ID = k.Keyword_ID WHERE p.Product_Name IN("sapien", "a") OR b.Brand_Name IN("...
use careconnect; SET SQL_SAFE_UPDATES = 0; delete from AllergyIntoleranceManifestation where ALLERGY_REACTION_ID > 2; delete from AllergyIntoleranceReaction where ALLERGY_ID > 2; delete from AllergyIntoleranceIdentifier where ALLERGY_ID > 2; delete from AllergyIntoleranceCategory where ALLERGY_ID > 2; delete from Al...
-- ------------------------------------------------------------------------------ -- Author: Kavi Sekhon -- Date: May 2019 -- Purpose: Aggregation Queries -- ------------------------------------------------------------------------------ -- -------------------------------------- -- Group By (80% of queries) -- ------...
DROP TABLE IF EXISTS homeworks,refers,reviews,solutions,reviewAudits; CREATE TABLE homeworks ( id SERIAL PRIMARY KEY, homeworkName VARCHAR(64) NOT NULL, courseId int NOT NULL REFERENCES courses(id) ON UPDATE CASCADE ON DELETE CASCADE, maxReachablePoints INTEGER NOT NULL, requireCorrectingDocument...
CREATE SCHEMA `internetshop` DEFAULT CHARACTER SET utf8 ; CREATE TABLE `internetshop`.`items` ( `item_id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `price` DECIMAL(12,2) NOT NULL, PRIMARY KEY (`item_id`)); CREATE TABLE `internetshop`.`orders` ( `order_id` INT NOT NULL AUTO_INCREME...
SELECT DISTINCT T1.REPAY_STATUS FROM FAC_REPAY_PRINCIPAL T1 WHERE T1.INVOICE_ID = /*invoiceId*/'' AND T1.REPAY_TYPE = /*codeRepayTypeCredit*/'' --(CODE MASTER:417(还款种类)) AND T1.NO_NEED_FLG = /*codeFactoringNoneedReceiveFlgNo*/'' --(CODE MASTER:454(回收不要区分))
SELECT CHECKSUM('hello') -- 533340124 , CHECKSUM('Hello') -- 533340124 , CHECKSUM('olleh') -- 1600790340 , CHECKSUM('hloel') -- 1606885152
SELECT posts.*, username FROM posts JOIN users ON (posts.seller_id = users.id) WHERE active = true AND approved = true ORDER BY time_posted DESC LIMIT 10;
SELECT city, city_id FROM city WHERE city IN ('Qalyub', 'Qinhuangdao', 'Qomsheh', 'Quilmes'); SELECT district FROM address WHERE city_id IN ( SELECT city_id FROM city WHERE city IN ('Qalyub', 'Qinhuangdao', 'Qomsheh', 'Quilmes') );
CREATE DATABASE furniture_company; USE furniture_company; CREATE TABLE `customers` ( `customerNumber` int(11) NOT NULL AUTO_INCREMENT, `customerName` varchar(50) NOT NULL, `addressLine1` varchar(50) NOT NULL, `addressLine2` varchar(50) DEFAULT NULL, `city` varchar(50) NOT NULL, `state` varchar(50) DEFAULT ...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 03-06-2021 a las 06:52:34 -- Versión del servidor: 10.4.19-MariaDB -- Versión de PHP: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 23 Jun 2020 pada 04.21 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
INSERT INTO `db688129345`.`ToolRoomEquipment` (`count`, `name`) VALUES ('4', 'Programmable CNC milling machines'); INSERT INTO `db688129345`.`ToolRoomEquipment` (`count`, `name`) VALUES ('3', 'Surface grinders'); /* SELECT * FROM `ToolRoomEquipment` ORDER BY `ToolRoomEquipment`.`count` DESC */
CREATE DATABASE IF NOT EXISTS COWE DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON COWE.* TO test@localhost IDENTIFIED BY 'test*'; USE COWE; CREATE TABLE IF NOT EXISTS GET_USER ( ID_USER INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, FIRST_NAME VARCHAR(30), LAST_NA...
/* 用户订单管理系统 */ /*Alter database character set utf8; 更改库的字符集*/ /*创建库*/ /*CREATE DATABASE r_user DEFAULT CHARSET utf8 COLLATE utf8_general_ci;*/ /*会员表*/ CREATE TABLE r_user( uid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, user CHAR(30), password VARCHAR(50) NOT NULL, em...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2018 at 08:21 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
--BEGIN NC辅料档案对照表 CREATE TABLE "NBADV"."TRA_AUXI_MATERIAL_TEMP" ("NAME" VARCHAR(100), "PK_CORP" VARCHAR(20), "ID" INTEGER ) DATA CAPTURE NONE IN "USERSPACE3" CCSID UNICODE@ ALTER TABLE "NBADV"."TRA_AUXI_MATERIAL_TEMP" LOCKSIZE ROW APPEND OFF NOT VOLATILE LOG INDEX BUILD NULL@ COMMENT ON ...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.5.27 - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL Version: 8.0.0.4396 -- -------------------------------------------------------- /*...
UPDATE "FileProperty" SET "Ordinal" = 1 WHERE "Name" = 'FoiExemptionAsserted'; UPDATE "FileProperty" SET "Ordinal" = 2 WHERE "Name" = 'ClosureStartDate'; UPDATE "FileProperty" SET "Ordinal" = 3 WHERE "Name" = 'ClosurePeriod'; UPDATE "FileProperty" SET "Ordinal" = 4 WHERE "Name" = 'FoiExemptionCode'; UPDATE "FilePropert...
#ADICIONAR DADOS NA TABELA ESTADO INSERT INTO `tb_estado` (`cod_estado`, `nome_estado`, `uf`) VALUES (1, 'Santa Catarina', 'SC'); #ADICIONAR DADOS NA TABELA CIDADE INSERT INTO `tb_cidade` (`cod_cidade`, `nome_cidade`, `cep`, `cod_estado`) VALUES (1, 'Itapiranga', '89896000', 1); #ADICIONAR DADOS NA TABELA CATALOGO IN...
insert into avatars (avatar_base_type_id, level, skin, hair, picture_url, night_background_url, day_background_url, status, text_id, created_by, created_date) values (2, 1, 3, 3, 's3h3.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (2, 2, 3, 3, 's3h3.png', 'night1.png', 'day1.png', 'ACTIVE', 1,...
CREATE USER IF NOT EXISTS maxroach; CREATE DATABASE IF NOT EXISTS review; GRANT ALL ON DATABASE review TO maxroach;
CREATE OR REPLACE VIEW "RESOURCE_CAPACITY"."PNMAC"."VW_WEEKLYTOTALSBYEMP" AS select employee_id ,year ,week ,ceil(sum(billable_hours),1) as total_weekly_hours ,(CASE WHEN ceil(sum(billable_hours),1) >= 40 THEN 40 ELSE ceil(sum(billable_hours),1) END) as capped_weekly_h...
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: film_simple -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
DELIMITER / ALTER TABLE IACUC_PROTOCOL_ACTIONS ADD CREATE_USER VARCHAR(60) / ALTER TABLE IACUC_PROTOCOL_ACTIONS ADD CREATE_TIMESTAMP DATE / DELIMITER ;
-- ============================================================ -- Table : FABRICATION -- ============================================================ CREATE TABLE Fabrication( idMachineFab NUMBER GENERATED ALWAYS AS IDENTITY , nomMachineFab Varchar (25)...
alter table Work add WorkDesc varchar(2000)
CREATE TABLE Users( username VARCHAR(100) PRIMARY KEY NOT NULL, password VARCHAR(100) NOT NULL, fullname VARCHAR(100) NOT NULL, birthday DATE, address VARCHAR(256), phone VARCHAR(20), expirationDate DATE NOT NULL, deposit INTEGER NOT NULL ); CREATE TABLE Admins( username VARCHAR(100) P...
-- //NOTE: If you need to start completely new, uncommenting and using the following line will wipe out the db and all data in it. -- //DROP TABLE IF EXISTS deliverpickup CREATE TABLE stores( store_id INT primary key, store_Name VARCHAR, store_Address VARCHAR, store_PhoneNumber VARCHAR ); CREATE TABLE items( ...
Select * from indian_food Select * from rainfall_codes -- Merging both tables or datasets using SQL LEFT JOIN Statement. SELECT indian_food.*,rainfall_codes.annual_rainfall INTO receipes_rainfall FROM indian_food LEFT JOIN rainfall_codes ON indian_food.state_code = rainreceipes_rainfallfall_codes.state_code;
-- Table Aliasing -- Here's the basic structure of a simple JOIN query select Person.FirstName, Person.LastName, EmailAddress.EmailAddress from Person.Person JOIN Person.EmailAddress ON Person.BusinessEntityID = EmailAddress.BusinessEntityID where LastName like 'b%' order by LastName, FirstName -- Tab...
SELECT * From benn.nfl_touchdowns LIMIT 500
create database db01 default character set utf8 collate utf8_bin; create database db02 default character set utf8 collate utf8_bin;
INSERT INTO ROLES (id) VALUES ('admin'); INSERT INTO ROLES (id) VALUES ('developer'); INSERT INTO ROLES (id) VALUES ('analyst'); INSERT INTO ROLES (id) VALUES ('reader'); INSERT INTO ORGS (id) VALUES ('uts'); INSERT INTO ORGS (id) VALUES ('backups'); INSERT INTO ORGS (id) VALUES ('ebiz'); INSERT INTO DEPLOYMENTS (id,...
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: localhost Database: library -- ------------------------------------------------------ -- Server version 5.7.13-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
SELECT DISTINCT subjectid, type as cell_type, timepoint, ('SDY' || split_part(subjectid, '.', 2)) as studyid, assay, timepoint_sortorder FROM immport.dimSample LEFT OUTER JOIN immport.dimSampleAssay sa on dimSample.sampleid = sa.sampleid
SELECT id_typ FROM ngs.type WHERE name = ?
-- Создать модифицируемое представление. CREATE OR REPLACE ALGORITHM = MERGE VIEW `stored_editions` (`isbn`, `book_id`, `pub_id`, `circulation`) AS SELECT `isbn`, `book_id`, `pub_id`, `circulation` FROM `editions` WHERE `date_stamp` > '2012-12-12'; -- Выполнить для полученного представления запрос INSERT. INSERT I...
CREATE DATABASE facebook; CREATE TABLE t_user( iuser INT PRIMARY KEY AUTO_INCREMENT, email VARCHAR(50) UNIQUE NOT NULL, pw VARCHAR(100) NOT NULL, nm VARCHAR(5) NOT NULL, tel VARCHAR(13), authcd CHAR(5) COMMENT '회원가입 인증코드', mainprofile varchar(50), regdt DATETIME DEFAULT NOW(), INDEX idx_auth...
``` 获取当前(to_date='9999-01-01')薪水第二多的员工的emp_no以及其对应的薪水salary CREATE TABLE `salaries` ( `emp_no` int(11) NOT NULL, `salary` int(11) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL, PRIMARY KEY (`emp_no`,`from_date`)); ``` ``` SELECT emp_no,max(salary) FROM salaries WHERE to_date='9999-01-01'and salary <(sel...
SELECT COUNT(*) FROM ( SELECT COUNT(Category) as 'c' FROM Categories GROUP BY ItemID ) as 'numCats' WHERE numCats.c = 4;
/* Navicat Premium Data Transfer Source Server : 9.9.9.20 - 9.4 - 5432 Source Server Type : PostgreSQL Source Server Version : 90415 Source Host : 9.9.9.20:5432 Source Catalog : motel Source Schema : public Target Server Type : PostgreSQL Target Server Version : 90415 ...
create table dog_intelligence( dog_intel_id uuid default generate_uuid_v4(), breed varchar(50) not null, classification varchar(100) not null, obey float, reps_lower int, reps_higher int, primary key(dog_intel_id), unique(breed) ); create table dog_breeds( dog_breed_id uuid defaul...
# 2020/06/19 국민은행 키워드가 들어간 문서들의 연관 키워드들 # 현재 170메가정도 사용 ==> Access영역을 10메가 내로 줄일 필요가 있음 SELECT A.KEYWORD , COUNT(A.KEYWORD) AS cnt FROM `kb-daas-dev.mart_200723.keyword_list` A , ( SELECT TYPE, ID FROM `kb-daas-dev.mart_200723.keyword_search` WHERE KEYWORD_IDX = MOD(ABS(FARM_FINGERPRINT('국민...
/* -- Query: SELECT * FROM mydatabase.cupcake LIMIT 0, 1000 -- Date: 2020-02-19 11:14 */ INSERT INTO `` (`Price`,`Quantity`,`Profit`,`Size`,`Barcode`,`Type`) VALUES ('R30','56','R750','Each','221','honeycomb'); INSERT INTO `` (`Price`,`Quantity`,`Profit`,`Size`,`Barcode`,`Type`) VALUES ('R25','89','R506','Each','222',...
获取当前(to_date='9999-01-01')薪水第二多的员工的emp_no以及其对应的薪水salary SELECT emp_no,salary FROM salaries WHERE to_date = '9999-01-01' ORDER BY salary DESC LIMIT 1,1
# Write your MySQL query statement below select o.customer_id, name from orders o left join customers c on o.customer_id=c.customer_id left join product p on o.product_id=p.product_id group by o.customer_id, name having sum(if(left(order_date,7) = '2020-06',quantity,0) * price)>=100 and sum(if(left(order_date,7) = '2...
ALTER TABLE FIN_INT_ENTITY_YNQ ADD CONSTRAINT FK_FIN_INT_ENTITY_YNQ_DISCL FOREIGN KEY (PERSON_FIN_INT_DISCLOSURE_ID) REFERENCES PERSON_FIN_INT_DISCLOSURE (PERSON_FIN_INT_DISCLOSURE_ID) / ALTER TABLE FIN_INT_ENTITY_YNQ ADD CONSTRAINT FK_FIN_INT_ENTITY_YNQ_YNQ FOREIGN KEY (QUESTION_ID) REFERENCES YNQ (QUE...
select unique award_id from award_custom_data where award_number = '000000-00000'; -- Award_Trans_missingSeqn1_inCustData... Select t.* From Award_Transaction_Summ_View t Where Award_Number not in (Select ac.Award_Number from Award_Custom_Data ac Where ac.Sequence_Number = 1) AND Oblig...
if (object_id('Customers') is null) create table Customers ( Id int not null identity constraint pk_Customers primary key , FirstName nvarchar(30) not null , LastName nvarchar(30) not null , Age int null , YearlyIncome int null )
DROP TABLE frames; DROP TABLE games; DROP TABLE users;
CREATE DEFINER=`root`@`localhost` PROCEDURE `organizerooms`.`PROC_RECUPERA_DISPONIVEIS`(idUnidade INT, lotacao INT, dataInicial DATETIME, dataFinal DATETIME, dataAgendamento DATE) BEGIN select SALA_ID, SALA_NOME, SALA_LOTACAO from sala s where s.sala_id not in ( select s.sala_id from agendamento a inner join sala s o...
-- MySQL dump 10.13 Distrib 5.5.29, for Linux (x86_64) -- -- Host: localhost Database: orgror -- ------------------------------------------------------ -- Server version 5.5.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
use DBBTA CREATE TABLE [Employee Activation] ( Id INT PRIMARY KEY CLUSTERED, ActivationCode uniqueidentifier NOT NULL, ); CREATE TABLE [Admin SMTP parameteres] ( Ind int PRIMARY KEY IDENTITY(1,1), UserName NVARCHAR(50) NOT NULL, password NVARCHAR(30) NOT NULL, host NVARCHAR(30) NOT NU...
-- -------------------------------------------------------- -- 호스트: 127.0.0.1 -- 서버 버전: 10.4.12-MariaDB - mariadb.org binary distribution -- 서버 OS: Win64 -- HeidiSQL 버전: 10.2.0.5599 -- -----------------------------------------------...
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 31, 2015 at 03:34 PM -- Server version: 5.5.32 -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
CREATE DATABASE IF NOT EXISTS `pos_database_punto_venta`; USE `pos_database_punto_venta`; DROP TABLE IF EXISTS `pos_categorias`; CREATE TABLE IF NOT EXISTS `pos_categorias` ( `id` BIGINT(11) NOT NULL AUTO_INCREMENT, `nombre` VARCHAR(20) NOT NULL, `descripcion` VARCHAR(50) NOT NULL, `creacion` TIMESTAMP NOT N...
/* group by */ /* É como agrupar por categoria */ SELECT ExpedidorID, COUNT(ExpedidorID)FROM Pedidos GROUP BY ExpedidorID; /* Vou obter o ExpedidorName em outra tabela */ SELECT Pedidos.ExpedidorID, COUNT(Pedidos.ExpedidorID), ExpedidorName FROM Pedidos LEFT JOIN EXPEDIDOR ON Pedidos.ExpedidorID = Expedidor....
DROP TABLE IF EXISTS comment; DROP VIEW IF EXISTS comment; CREATE TABLE comment AS SELECT cmt_id as id, cmt_time as time, id as user, cmt_comment as comment, cmt_visability as visibility, pend_id as request FROM acc_cmt INNER JOIN user on username = cmt_user; ALTER TABLE comment CHANGE COLUMN id...
/* Add into the PC table all the PC models from the Product table that are absent from the PC table. Along with above the inserted models must have the specifications: 1. The code should be equal to the model number plus maximal code value which has been in the PC table before insert operation. 2. Speed, RAM and HD ...
create or replace type address AS object ( house_no varchar2(10), street varchar2(30), city varchar2(20), pincode varchar2(10) ); create or replace type customer AS object ( code number(5), name varchar2(30), contact_no varchar2(12), addr address, member procedure display ); declare residence address; begin...
 create PROC [ERP].[Usp_Sel_AnticipoVenta_Inactivo] @IdEmpresa INT, @IdAnio INT, @IdMes INT AS BEGIN SELECT ENT.Nombre Cliente, AN.IdCliente IdCliente, AN.IdMoneda IdMoneda, TD.Abreviatura TipoDocumento, ETD.NumeroDocumento NumeroDocumento, AN.IdTipoComprobante IdTipoComprobante,...
use stu_manage insert into course_info(course_id,course_name,book_id,credit) values ('CS2020001','Database','001',6.0), ('CS2020002','Web Design','002',6.0), ('CS2020003','3D Animation','003',3.0), ('ECE2020001','Python','004',4.0), ('SE2020001','Android Design','102',6.0), ('SE2020002','Software','201',5.0); select*f...
-- delete_schema_stats.sql -- delete statistics for a schema -- if stattab is null then the statistics are deleted directly from the dictionary -- otherwise they are deleted from the stattab table -- (statid guaranteed to be null as well when this script is called from delete_stats.sh) -- if an argument has a value ...
create or replace view fmv_uomvct as select tt.dimensionID,tt.No,Tt.Unite ,v.vct_em_addr coefficientID ,v.val Key ,v.val Description ,v.num_crt from ( select r.fam7_em_addr dimensionID ,r.numero_crt-68 NO ,f.unite from rfc r left join fmv_productUnite_inrow f on r.fam7_em_addr=f.fam_em_addr AND r...
/* Un temps de réflexion s'impose : la structure de la base de données vous impose de remplir les tables dans un ordre défini, afin de respecter les contraintes de clés étrangères. Quel est l'ordre à adopter ? Argumenter. ----la structure de la base de données , nous impose de remplir les tables dans un ordre définis...
CREATE CREDENTIAL ResultsPx WITH IDENTITY = 'https://resultspx.blob.core.windows.net/dbbackups', SECRET = 'zyNikkR7jBnCfox9ubvnKt2Wu+RVoo1ZTgKrsei9J1AkOUqS5mxAI2q2860tyif+fx63YRCre1fQSVxdW3FdFQ==';
DROP TABLE IF EXISTS p4_Feeds; DROP TABLE IF EXISTS p4_Categories; CREATE TABLE `p4_Categories` ( `ID` int(255) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, `Category` varchar(255) COLLATE 'utf8_general_ci' NOT NULL ) ENGINE='InnoDB' COLLATE 'utf8_general_ci'; CREATE TABLE `p4_Feeds` ( `ID` int(255) unsigned N...
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Anamakine: localhost:3306 -- Üretim Zamanı: 01 Oca 2017, 23:57:20 -- Sunucu sürümü: 10.0.27-MariaDB -- PHP Sürümü: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
SELECT assignments.id as "id", assignments.name, assignments.day, assignments.chapter, count(assistance_requests.*) as total_requests from assignments LEFT JOIN assistance_requests ON assignment_id = assignments.id group by assignments.id order by total_requests desc
TRUNCATE TABLE users, friends, subscribe, blocks; INSERT INTO users(id, email) VALUES (1, 'andy@example.com'); INSERT INTO users(id, email) VALUES (2, 'john@example.com'); INSERT INTO users(id, email) VALUES (3, 'kate@example.com'); INSERT INTO users(id, email) VALUES (4, 'lisa@example.com'); INSERT INTO subscribe(re...