blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
aed50c696a074fa2b256bd052aad4b759442150f | SQL | powerima/jspproject | /JSPProject/WebContent/board/board.sql | UTF-8 | 1,526 | 3.28125 | 3 | [] | no_license | drop table examtbl;
Create table examtbl (
sno varchar2(5) not null primary key,
sname varchar2(10) ,
kor number(3) ,
eng number(3) ,
math number(3) ,
hist number(3)
);
insert into examtbl (sno, sname, kor,eng,math,hist)
values('10101', '김학생', 75, 85, 90, 60);
insert into examtbl (sno, sname, kor,eng,ma... | true |
3b6d1da1e0358fe5c4f898b1aae8b59d52749046 | SQL | LAYBOE/Codeigniter-Restful | /raw sql/test.sql | UTF-8 | 1,555 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 19, 2018 at 04:00 AM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
5b5db35900b7dce380cf024fbaefc5a485c87b53 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/BonusRulesUpdateBonusTransfered.sql | UTF-8 | 2,148 | 3.71875 | 4 | [] | no_license | DROP procedure IF EXISTS `BonusRulesUpdateBonusTransfered`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `BonusRulesUpdateBonusTransfered`()
BEGIN
-- Do not set allow_awarding_bonuses if it is off
DECLARE awardedDateLast, awardedDateTo DATETIME DEFAULT NULL;
UPDATE gaming_bonus_rules
... | true |
d608f22defcd0cadb3a977c00b77879ade81cf99 | SQL | konglingjuanyi/game-server | /src/main/resources/sql/mysql/schema.sql | UTF-8 | 861 | 3.203125 | 3 | [] | no_license | drop table if exists nhdtask;
drop table if exists nhduser;
create table nhd_task (
id bigint auto_increment,
title varchar(128) not null,
description varchar(255),
user_id bigint not null,
primary key (id)
) engine=InnoDB;
create table nhd_user (
id bigint auto_increment,
login_name varchar(64) not null un... | true |
91da18791d4f2957d95fc732839de5dee7e226b3 | SQL | javanos/pgcodekeeper | /apgdiff.tests/src/main/resources/cz/startnet/utils/pgdiff/drop_comments_diff.sql | UTF-8 | 642 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | COMMENT ON DATABASE current_database() IS NULL;
SET search_path = public, pg_catalog;
COMMENT ON COLUMN typ_composite.key IS NULL;
COMMENT ON TYPE typ_composite IS NULL;
COMMENT ON DOMAIN dom IS NULL;
COMMENT ON SEQUENCE test_id_seq IS NULL;
COMMENT ON FUNCTION test_fnc(arg character varying) IS NULL;
COMMENT ON... | true |
9656c2d805cbdd4f2954a80d4569eab77e8bd0a5 | SQL | BaxAndreiRO/Scripturi-PHP | /Sistem BANIP/banip.sql | UTF-8 | 1,049 | 2.625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.7
-- http://www.phpmyadmin.net
--
-- Gazda: localhost:3306
-- Timp de generare: 27 Mar 2016 la 19:38
-- Versiune server: 5.5.48-cll
-- Versiune PHP: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
a31e52278e5a2512cba2d6edc245a8f9aa0d8731 | SQL | long187/seata | /saga/seata-saga-engine-store/src/main/resources/sql/oracle_init.sql | UTF-8 | 1,719 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | create table seata_state_machine_def
(
id varchar(32) not null,
name varchar(255) not null,
tenant_id varchar(32) not null,
app_name varchar(32) not null,
type varchar(20),
comment_ varchar(255),
ver varchar(16) not null,
gmt_create timestamp not null,
status varchar(2) not null,
... | true |
f7ecb2ae994c84fcb679a5998d86e97a67736600 | SQL | GeorgeNikou/mySQL_workspace | /Module 1/extras/references/indexes.sql | UTF-8 | 2,800 | 4.1875 | 4 | [] | no_license | # creates a table
CREATE TABLE test_table (
id INT NOT NULL PRIMARY KEY,
name VARCHAR(10) NOT NULL
);
# adding an index to an existing table
ALTER TABLE test_table ADD INDEX ind_name(name);
# drops indexes
ALTER TABLE test_table DROP INDEX ind_name;
# second way of creating an index
CREATE INDEX ind_name ON ... | true |
04ca4d698a876261dbe7a4c5d01f1febd39e0602 | SQL | farazahmed879/Score-Exec-Web-Portal | /Sp/Scripts/Merge Two Queries.sql | UTF-8 | 2,725 | 4.25 | 4 | [] | no_license | WITH HomeTeam AS(
SELECT Batsman,
Runs,
Bowler,
Wickets,
BowlingRuns,
RunsRank
FROM
(
SELECT P.Player_Name AS Batsman,
PS.Bat_Runs As Runs,
PS.TeamId,
RANK() OVER (ORDER BY PS.Bat_Runs desc) AS RunsRank
FROM PlayerScores PS
JOIN Players P ON PS.PlayerId = P.Playe... | true |
ac201d606664cfbe9471829e531c9a3b3dc8bf92 | SQL | nvanneste/exercises | /exercise4.sql | UTF-8 | 4,684 | 3.484375 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
8e486a8dcaf04caf00fb29a66e1623974fb4016b | SQL | inehemiasm/JavaFinalProject | /JavaProject/SQL (1)/java_final.sql | UTF-8 | 798 | 3.5625 | 4 | [] | no_license | drop database java_squad;
create database java_squad;
create user 'final'@'localhost' identified by 'me';
grant select, insert, update, delete, create, create view, drop,
execute, references on java_squad.* to 'final'@'localhost';
use java_squad;
drop table if exists Player;
drop table if exists Score;
create table... | true |
c276b432ec049f1290f3b440e05d749741053d48 | SQL | homensdaluta/SLO-ML | /tool/src/knowledge_base.sql | UTF-8 | 2,694 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 08, 2020 at 07:31 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
7c8ff67e9cb18cc3e593b6e294296746651825ce | SQL | JARE2001/Construccion-de-software | /lab16/crear.sql | UTF-8 | 2,428 | 3.671875 | 4 | [] | no_license | IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Entregan')
DROP TABLE Entregan
CREATE TABLE Entregan
(
Clave numeric(5) not null,
RFC char(13) not null,
Numero numeric(5) not null,
Fecha DateTime not null,
Cantidad numeric (8,2)
)
IF EXISTS (SELECT * FROM INFORMAT... | true |
e04194b83fc74e3f91d8f31c3110feb518781032 | SQL | ZacCui/cs3311-database_system | /exam/pastpaper/q6.sql | UTF-8 | 971 | 3.90625 | 4 | [] | no_license | -- COMP3311 12s1 Exam Q6
-- The Q6 view must have attributes called
-- (location,date,team1,goals1,team2,goals2)
drop view if exists goalslist;
create view goalslist
as
select m.id as id , t.id as team, count(*) as num
from matches m
join goals g on (m.id = g.scoredIn)
join players p on (p.id = g.scoredby)
join team... | true |
a47587b7985dedf024fc2993f2c3e32d50fa638f | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day09/select2322.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-08T23:22:00Z' AND timestamp<'2017-11-09T23:22:00Z' AND temperature>=49 AND temperature<=98
| true |
5d74f10439ac2d87577b914e8f1b208287339ce0 | SQL | sflyntr/BoardWeb | /src/main/resources/data.sql | UTF-8 | 632 | 2.78125 | 3 | [] | no_license | CREATE TABLE BOARD (
SEQ NUMBER(5) PRIMARY KEY,
TITLE VARCHAR2(200),
WRITER VARCHAR2(20),
CONTENT VARCHAR2(2000),
REGDATE DATE DEFAULT SYSDATE,
CNT NUMBER(5) DEFAULT 0
);
INSERT INTO BOARD (SEQ, TITLE, WRITER, CONTENT) VALUES (1, '가입인사', '관리자', '잘 부탁드립니다...');
CREATE TABLE USERS (
ID VARCH... | true |
86e09cdbfb156c716ca41f0d94b7e4efd665ba1f | SQL | sw33zy/BD-Project | /Projeto/FuteProject/views.sql | UTF-8 | 1,300 | 3.734375 | 4 | [
"MIT"
] | permissive | -- Aplicada na querie 19 para ir buscar os jogadores que passaram por um clube
Drop view if exists historico_clubes_clube;
Create view historico_clubes_clube as
Select j.nome, c.designacao, t.inicio_contrato From Historico_clubes t INNER JOIN Clube_anterior c on
c.id=t.Clube_anterior_id INNER JOIN Jogador j on t.Jogado... | true |
b62471f3e3e4eeb88762c1bb5d17b7852c9596eb | SQL | gonzaloreusch/sql-challenge | /table_schemata.sql | UTF-8 | 2,133 | 3.859375 | 4 | [] | no_license | -- table & info for titles
CREATE TABLE titles(
title_id varchar(64) PRIMARY KEY,
title varchar(64)
)
COPY titles(title_id,title)
FROM '/Users/greusch/Desktop/DA&V Commits/sql-challenge/EmployeeSQL/titles.csv'
DELIMITER ','
CSV HEADER;
SELECT * FROM titles
-- table & info for employees
CREATE TABLE employees(
emp_no i... | true |
87799290978ecbdb22b3577d7c1e39de83276364 | SQL | bellmit/CloudShopBootStrap | /gxsql/1.0.1/06_dml_t_verify_code_gengshuqiang.sql | UTF-8 | 343 | 2.546875 | 3 | [] | no_license | CREATE TABLE `t_verify_code` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone_number` varchar(255) DEFAULT NULL COMMENT '接收手机号',
`send_time` datetime DEFAULT NULL COMMENT '发送时间',
`code` varchar(200) DEFAULT NULL COMMENT '验证码',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
| true |
097dfe7973c931d94ac9a48fc2373a476da9eeff | SQL | radtek/abs3 | /sql/mmfo/bars/Table/finmon_que_modification.sql | WINDOWS-1251 | 5,065 | 3.109375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/FINMON_QUE_MODIFICATION.sql =========*
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
3486802666fdfa80a0033593526295210f67abeb | SQL | kveola13/MYSQL-NITH | /Oppgaver.sql | UTF-8 | 453 | 3.203125 | 3 | [] | no_license | SELECT * FROM city;
SELECT * FROM city WHERE CountryCode ="NOR" ORDER BY name, population;
SELECT NAME, Population FROM city WHERE countrycode='NOR';
SELECT Count(*) AS "Antall Byer" FROM country;
SELECT sum(Population) AS "World Population" FROM country;
SELECT sum(Population) AS "Folketall i Asia" FROM country WHERE ... | true |
dd5f134be09fb2b0da97fcfc2adbe32653450f8b | SQL | sheikhatickoo9/hotel | /database/tb_file_012.sql | UTF-8 | 1,593 | 2.953125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.48 - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL Version: 9.5.0.5222
-- --------------------------------------------------------
/*... | true |
fdce39d3a40456d032ffbe33995c8eda7fd66f65 | SQL | lepouletsuisse/Christophe-Samuel | /BDR/Labo 3/ex3.sql | UTF-8 | 237 | 3.640625 | 4 | [] | no_license | USE sakila;
SELECT customer_id AS 'numéro', first_name AS 'prénom', last_name AS 'nom'
FROM customer
INNER JOIN address ON customer.address_id = address.address_id
WHERE active = 1 AND city_id = 321 AND store_id = 2
ORDER BY last_name; | true |
aa340e8f1f45fe84094047a66133b6edf95baf1b | SQL | statedemocrats/ks-votes | /sql/precincts-with-tracts.sql | UTF-8 | 206 | 3.59375 | 4 | [] | no_license | select p.id,p.name,p.census_tract_id,c.vtd_code
from precincts as p left join census_tracts as c on c.id=p.census_tract_id
where p.county_id in (select id from counties where name = '{0}')
order by p.name;
| true |
279cefa38baf409a7f21dfa85fcb4d22b76a620c | SQL | topcoder-platform/tc-website | /docs/online_review/xsl_queries.sql | UTF-8 | 7,123 | 3.296875 | 3 | [] | no_license |
--Query: open_projects original:
select cv.version,
cvd.posting_date,
cvd.initial_submission_date,
cvd.aggregation_complete_date winner_announced_date,
cvd.final_submission_date,
cvd.estimated_dev_date,
cvd.price,
cd.document_id,
cvd.status_id,
... | true |
0f901ac4fb2ab5ae18415d42fa88d5dfc669bf50 | SQL | FIRSTTeam102/2014-scoring-app | /team102_2014-db-backup/tournament_teams2014-02-26 21-07-55.sql | UTF-8 | 1,084 | 2.953125 | 3 | [] | no_license | USE team102_2014;
CREATE TABLE `tournament_teams` (
`tournament_id` varchar(20) NOT NULL,
`team_number` int(11) NOT NULL,
PRIMARY KEY (`tournament_id`,`team_number`),
KEY `tour_team_team_id_fk` (`team_number`),
CONSTRAINT `tour_team_team_id_fk` FOREIGN KEY (`team_number`) REFERENCES `teams` (`number`) ON D... | true |
20974728b62276338cffad1fdcc873cc4023322e | SQL | myles-dewaal/bamazon | /bamazonCustomer.sql | UTF-8 | 738 | 2.8125 | 3 | [] | no_license | CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
ID INTEGER NOT NULL,
product_name VARCHAR(20),
department_name VARCHAR(20),
price INTEGER(10),
stock_quantity INTEGER(10),
PRIMARY KEY (ID)
);
INSERT INTO products (
product_name, department_name, price, stock_quantity
) VALUES... | true |
822e8869187f001848b46cdfed79360b9a86060c | SQL | jjwarren44/Custom-Controllers-Inc | /src/db/users.sql | UTF-8 | 1,387 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 15, 2019 at 01:43 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c224bca238166ab7a69f2eb7fcfe79211287a037 | SQL | PAWTOSKI/simplon | /requetes_avancees_sakila_sql.sql | UTF-8 | 9,261 | 4.25 | 4 | [] | no_license | #quetsion 1:afficher le nombre de films dans lesquels a joué l'acteur johny lollobrigida regoupé par catégorie
SELECT COUNT(f.title) as count_f, f.title
FROM film as f
JOIN film_actor as f_a on f_a.film_id=f.film_id
JOIN actor AS a ON a.actor_id=f_a.actor_id
JOIN film_category as f_c on f_c.film_id=f.film_id
JOIN... | true |
25883b257770100b35f3ae73820e8bed6c148c35 | SQL | mihosraf/WEB-DEVELOPMENT | /uni-2.sql | UTF-8 | 6,495 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 14, 2019 at 07:10 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ed90fba7d9115477878bc83f10118d31a68c085a | SQL | wszclm/cockpit | /src/main/resources/sql/fenshuizhen/initModelTable.sql | UTF-8 | 1,352 | 2.921875 | 3 | [] | no_license | DROP TABLE IF EXISTS `enterprise_comprehensive_info`;
CREATE TABLE `enterprise_comprehensive_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ADMIN_DIVISION` varchar(500) DEFAULT NULL COMMENT '行政区域',
`ORGANIZATION_CODE` varchar(500) DEFAULT NULL COMMENT '组织机构代码',
`ORGANIZATION_NAME` varchar(500) DEFAULT NULL COMM... | true |
af5de65252c314ee5f62648a4836fe4aa178438a | SQL | widiar/BEOL-belanja-online | /beol.sql | UTF-8 | 5,601 | 2.953125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 13 Des 2019 pada 19.11
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
f7c2558f1a18ccffbc84b85a71303d134b949250 | SQL | IvanLychkovakha/WebsiteOnPHP | /db.sql | UTF-8 | 22,914 | 3.203125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Май 20 2020 г., 22:45
-- Версия сервера: 10.4.11-MariaDB
-- Версия PHP: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
327e8967abb3509c98fc1cf40c0042945d3b5899 | SQL | febiDA/Tugas-PBO | /123180069_DB_MVC_A/dbcontact.sql | UTF-8 | 1,594 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Apr 2020 pada 23.32
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
35c55811e601260ab265cd338df17ca72a6081ee | SQL | Genuris/crm-backend | /crm.sql | UTF-8 | 48,710 | 3.015625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Фев 27 2019 г., 12:30
-- Версия сервера: 5.5.50
-- Версия PHP: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
43e33e050ee7489d6a27d83a7b972dc4c30d39f1 | SQL | Ms507376/SQL-Query | /Query.sql | UTF-8 | 6,649 | 3.875 | 4 | [] | no_license | /* ----------------------Table – EmployeeDetails------------------------------------------------------------
EmpId FullName ManagerId DateOfJoining City
121 John Snow 321 01/31/2014 Toronto
321 Walter White 986 01/30/2015 California
421 Kuldeep Rana 876 27/11/2016 New Delhi
---------... | true |
a9c7e232dbaf264ac5fd9de5a12267836d10c57f | SQL | esra71/spor_salonu_otomasyonu | /demoo.sql/adminler.sql | UTF-8 | 1,206 | 2.625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 15 Haz 2020, 10:12:02
-- Sunucu sürümü: 10.4.11-MariaDB
-- PHP Sürümü: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
32cd654b7888724746e2dead51198ef8f5f3da86 | SQL | liewteh/SQL-Coursework-Week1 | /2-classes-db/setup_answer.sql | UTF-8 | 5,128 | 4.1875 | 4 | [] | no_license | -- ### 1. Show the date, transaction_no, description and
-- amount for those transactions whose amount is between £30,000 and £31,000.
SELECT date,
transaction_no,
description,
amount
FROM spends
WHERE amount >= 30000
AND amount <= 31000;
-- OR
SELECT date,
transaction_no,
description,
... | true |
236262f2c2261c438f88b9c2148fe4baa2b92b2d | SQL | gmahomarf/SAT | /src/BD/DDL.sql | UTF-8 | 9,495 | 3.734375 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `sat` ;
USE `sat`;
-- -----------------------------------------------------
-- Table `sat`.`cuencas`
-- ---... | true |
72bb1eb90efbb81d292f666dcde8caddb2781dfe | SQL | demigodjessica/database-coursework | /Project1_JessicaJu_Query1through9.sql | UTF-8 | 3,551 | 4.53125 | 5 | [] | no_license | -- Jessica Ju
-- ID#
-- 11/17/2013
-- Project 1 for EECS 116
-- Problem 1
-- Find each topic find the total number of blurts that were analyzed as being related
-- to the topic. Print topic id, topic description, and the count
select topic.id, topic.description, count(*) from blurt_analysis join topic
on blurt_a... | true |
5056bcc90b49e34a8845f66e4091dd4a21e1e008 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_16066_BINARY_charset/_00_String_Functions_and_Operators/cases/position_001.sql | UTF-8 | 3,046 | 3.3125 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names binary;
SELECT POSITION ('' IN '12345abcdeabcde');
SELECT POSITION ('abcd' IN '12345abcdeabcde');
SELECT POSITION ('나' IN '12345가나다라마가나다라마'),cast(_utf8'나' as string charset binary),cast(_utf8'12345가나다라마가나다라마' as string charset binary) ;
SELECT POSITION ('f' IN '12345abcdeabcde');
----CUBRIDSU... | true |
f1526e94247825042077dddbb18529e170a92d75 | SQL | altus-ace/ACDW_CLMS_SHCN_MSSP | /ACDW_CLMS_SHCN_MSSP/adw/Functions/2020_tvf_Get_ERVisits.sql | UTF-8 | 1,888 | 3.734375 | 4 | [] | no_license |
CREATE FUNCTION [adw].[2020_tvf_Get_ERVisits]
(
@PrimSvcDate_Start DATE,
@PrimSvcDate_End DATE
)
RETURNS TABLE
AS RETURN
(
SELECT DISTINCT B1.[SEQ_CLAIM_ID]
,B1.[SUBSCRIBER_ID]
,B1.[CATEGORY_OF_SVC]
,B1.[ICD_PRIM_DIAG]
,B1.[PRIMARY_SVC_DATE]
,B1.[SVC_TO_DATE]
,B1.[CLAIM_THRU_DATE]... | true |
4cfed099ba6d289db05a5659bcb518415d16474c | SQL | 519986208/share | /cly-ssi/src/main/resources/mapper/sql脚本/t_user.sql | UTF-8 | 377 | 2.71875 | 3 | [] | no_license | DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`userName` varchar(32) NOT NULL,
`password` varchar(64) NOT NULL,
`nickName` varchar(64) NOT NULL,
`gender` char(8) DEFAULT '保密',
`createTime` datetime NOT NULL,
`updateTime` datetime NOT NULL,
PRIMARY ... | true |
7c237c8f11808e377322e8bdf988cb4ab2538d12 | SQL | gestiondedatos2013com57/TrabajosPracticos | /TP7/TP7_Ej4.9.sql | UTF-8 | 509 | 3.8125 | 4 | [] | no_license | /*
Ejercicio 4.9
Hallar los proveedores que proveen el artículo más caro que haya sido comprado alguna vez por un cliente de la ciudad de Salta.
*/
Select Prov.* from Proveedor as Prov
inner join Provee on Provee.id_Proveedor=Prov.id_Proveedor
where provee.id_Articulo in
(
Select ped.id_Articulo from Clientes as ... | true |
88fa402f7a3616823647582d06142df2415640f1 | SQL | Legresa/Datebase_2255_Lukicheva_Alena | /Многотабличные запросы №33.sql | UTF-8 | 163 | 2.953125 | 3 | [] | no_license | SELECT CASE
WHEN count(st.surname) > 0 THEN count(st.surname)::varchar
ELSE 'Не найдено'
END AS countofstd
FROM student st
WHERE st.surname like '%ов%'
| true |
eac025b91c3a0dff17e7bdfad73f18160e227e89 | SQL | Latyshevad/shorturl_yii_restaapi | /shortener_db.sql | UTF-8 | 1,656 | 3.0625 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 04 2018 г., 12:19
-- Версия сервера: 5.6.37
-- Версия PHP: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
ea2c61fc37e3d0b4b996e861245b600dd2cbae4c | SQL | ArnabSarker2004/Movies | /13.sql | UTF-8 | 334 | 3.875 | 4 | [] | no_license | --write a SQL query to list the names of all people who starred in a movie in which Kevin Bacon also starred.
SELECT DISTINCT name
FROM stars JOIN people ON stars.person_id = people.id
WHERE movie_id IN
(SELECT movie_id
FROM people JOIN stars ON people.id = stars.person_id
WHERE birth = 1958 AND name = "Kevin Bacon... | true |
db0923f2f272a21840acbab32b3a2e044b436b12 | SQL | Tornado12/ProyectoAvanzada | /Esquema_BD/Ultimo_Sql_estructura-BD.sql | UTF-8 | 7,322 | 3.234375 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v5.14
Host - 5.5.32 : Database - tornado_bd
*********************************************************************
Server version : 5.5.32
*/
SET NAMES utf8;
SET SQL_MODE='';
create database if not exists `tornado_bd`;
USE `tornado_bd`;
SET @OLD_SQL_MODE=@@SQL_MODE, SQ... | true |
a2b0c43dd5e7ce998c5711e99ed7683318f38151 | SQL | Rossmallow/CSC352_Assignments | /Assignments/hw4_RossNelson.sql | UTF-8 | 4,541 | 3.9375 | 4 | [] | no_license | -- Ross Nelson CSC352 Assignment 4
-- February 24th 2020
-- 1.
DECLARE
TYPE TP1
IS TABLE OF CHAR(1)
INDEX BY BINARY_INTEGER;
VP1 TP1;
LETTER CHAR(1) := CHR(ASCII('A'));
I NUMBER(2) := 0;
--This variable determines the last letter to be included.
STOP_LETTER CHAR(1) := CHR(A... | true |
631a68a897e1002da6a9431c403c79bcf00ce27c | SQL | Freizan/StreamManagerPrime | /scripts/eit.sql | UTF-8 | 1,807 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb1
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mer 16 Décembre 2015 à 10:48
-- Version du serveur : 5.5.40-0+wheezy1
-- Version de PHP : 5.6.2-1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
ab29ddb4eecb2e60e316d269900899b029fcd57f | SQL | Gudang-Source/pln-pelanggan | /database/pln-pelanggan.sql | UTF-8 | 3,432 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 11, 2020 at 05:05 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
b4072b29c4ca03a3a9a487347bf753c610efb6f8 | SQL | wf-oadenaike/TestProject | /TestDBProject/Access.ManyWho/Views/TrainingCoursesReadOnlyVw.sql | UTF-8 | 694 | 3.140625 | 3 | [] | no_license |
CREATE VIEW [Access.ManyWho].[TrainingCoursesReadOnlyVw]
AS
SELECT tc.TrainingCourseId
, tc.TrainingTitle
, tc.TrainingTypeId
, tt.TrainingType
, tc.AttestationRequiredYesNo
, tc.AnnualTrainingYesNo
, tc.AttendanceApproverPersonId
, ap.PersonsName as Attendance... | true |
6350009f454e807e7df2d0d58f720d1e68a4c94f | SQL | rodrigogarciacardoso/IV-Termo | /Banco de Dados/SCRIPT_BD.sql | UTF-8 | 1,101 | 3.40625 | 3 | [] | no_license |
CREATE TABLE AMBULATORIOS
(
NROA INT PRIMARY KEY NOT NULL,
ANDAR NUMERIC(3) NOT NULL,
CAPACIDADE SMALLINT
);
CREATE TABLE MEDICOS
( CODM INT PRIMARY KEY NOT NULL,
NOME VARCHAR(40) NOT NULL,
IDADE SMALLINT NOT NULL,
ESPECIALIDADE CHAR(20),
CPF VARCHAR(15) UNIQUE NOT NULL,
CIDADE VARCHAR(30... | true |
5ac09c6829e482860165bc90fc57c365d0ebc438 | SQL | skok1025/mysite | /mysite02/docs/procedures.sql | UTF-8 | 1,515 | 3.640625 | 4 | [] | no_license | DELIMITER $$
CREATE procedure proc_insertguestbook
(in pname varchar(20),in ppassword varchar(20),in pcontents text,out presult integer)
begin
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
set presult =0;
rollback;
END;
insert into guestbook(no,name,password,contents,reg_date)
select null,pname,ppa... | true |
25afc7e4076c95f63c38050c3c484a84a52a124c | SQL | Chenruii/YoutubeManager | /video.sql | UTF-8 | 1,795 | 3.078125 | 3 | [
"WTFPL"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 27 jan. 2019 à 20:25
-- Version du serveur : 5.7.19
-- Version de PHP : 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
00f9e4abab3be091b6806067cdd301ff0535bb24 | SQL | daniel-amos/SC-T-201-GSKI | /GSF/dw_10/CHECKFD.sql | UTF-8 | 19,700 | 3.3125 | 3 | [] | no_license |
Select 'R1: A --> B' AS FD,
CASE WHEN COUNT(*)=0 THEN 'HOLDS'
ELSE 'DOES NOT HOLD' END AS VALIDITY
FROM (
SELECT A
FROM R1
GROUP BY A
HAVING COUNT (DISTINCT B) > 1
) X;
Select 'R1: A --> C' AS FD,
CASE WHEN COUNT(*)=0 THEN 'HOLDS'
ELSE 'DOES NOT HOLD' END AS VALIDITY
FROM (
SEL... | true |
f2cf6a23288200906a025d771b392af9e2c6d6b4 | SQL | Wangxuemng/Restaurant-Reservation | /sql.sql | UTF-8 | 6,663 | 3.015625 | 3 | [] | no_license | -- --------------------------------------------------------
-- 主机: 119.23.215.203
-- 服务器版本: 5.7.23-0ubuntu0.16.04.1 - (Ubuntu)
-- 服务器操作系统: Linux
-- HeidiSQL 版本: 9.5.0.5196
-- -----------------------------------------------------... | true |
ecd798b4fc7654f918a5f9970f9c5189aa1f05ea | SQL | ArctosDB/DDL | /flat/flat_procedures__preMapSpecEventUpdate.sql | UTF-8 | 16,644 | 3.484375 | 3 | [] | no_license | /*
last edit explanation:
Updating anything that triggers to FLAT puts the Oracle system user in flat.lastuser.
"Anything" includes coll_object, so we can't just update in the FLAT procedures or we get the mutating trigger.
We want a lastuser formatted as preferred agent name, but need "lastuser" for the tri... | true |
e8198a5d8b4eb230a1940ed6901c5ac19c0fa89a | SQL | rahulyhg/shopclues | /Development/Code/SQL/Procedures/clues_billing_fee_sp.sql | UTF-8 | 10,590 | 3.390625 | 3 | [] | no_license | -- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
drop PROCEDURE if exists `clues_bi... | true |
8095eac57e012511226d27a7eec81a2bc26eb580 | SQL | AntonFriberg/EDA216 | /SQL_queries.sql | UTF-8 | 624 | 3.265625 | 3 | [] | no_license | -- Search pallet by date.
SELECT *
FROM Pallet
WHERE bakeDate LIKE '?';
-- Search pallet by NBR_FIELDS
SELECT *
FROM Pallet
WHERE palletNbr LIKE '?'
-- Search all
set @search := '?';
SELECT *
FROM Pallet WHERE palletNbr like @search
OR cookieName like @search
OR bakeDate like @search
... | true |
5b08f2911283309774fe23b3c3858b6d174b9d91 | SQL | rikardote/gys | /cvs/gys.sql | UTF-8 | 70,799 | 2.5625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 30, 2017 at 04:43 AM
-- Server version: 5.7.19-0ubuntu0.16.04.1
-- PHP Version: 7.1.8-2+ubuntu16.04.1+deb.sury.org+4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ti... | true |
95ed4231413ee012f1eeba2796f7e5cd769fe67c | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day11/select0656.sql | UTF-8 | 177 | 2.578125 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-10T06:56:00Z' AND timestamp<'2017-11-11T06:56:00Z' AND temperature>=6 AND temperature<=28
| true |
43717137fd5cd9397459ea789d836ad1a38ec724 | SQL | adowns1/java-web-dev-techjobs-persistent | /queries.sql | UTF-8 | 444 | 3.890625 | 4 | [] | no_license | ## Part 1: Test it with SQL
columns
id INTEGER
employer VARCHAR(20)
name VARCHAR(20)
skills VARCHAR(200)
## Part 2: Test it with SQL
DROP TABLE job;
## Part 3: Test it with SQL
DELETE FROM techjobs WHERE (job_id !== null)
## Part 4: Test it with SQL
SELECT name, description
FROM sk... | true |
766dce03d6b7bbd8b38c1b5fd026529f2ac5dba2 | SQL | team3316/kassandra-2019 | /server/queries/rankings.sql | UTF-8 | 3,502 | 4.21875 | 4 | [] | no_license | /*
Counting how many visible matches are there on a team
Shows cargo and panels per game averages
Shows only visible matches
*/
SELECT team_number, COUNT(visible = true) AS number_of_matches,
AVG(teleop_cargo_to_cargo_ship + teleop_cargo_to_level1 + teleop_cargo_to_level2 + teleop_cargo_to_level3 +
CASE sandst... | true |
12e544c6c925a00679ca8918cfbf1eab452b298f | SQL | fleetmack/mines | /me/annual_fund/traci_lanier/tracimatching072202.SQL | UTF-8 | 462 | 3.53125 | 4 | [] | no_license | select *
from a_dw_jobs j,
matching_policy m
where j.record_status_code = 'A'
and j.record_type_code = 'AL'
and m.id_number = j.employer_id_number
and j.employ_relat_code = 'PE'
and j.employer_id_number in
(select id_number
from matching_policy
where hep_ratio
in ('2','3'))
and j.id_number in... | true |
73eca91d378d1ee421b878deb2ecd69ce3477739 | SQL | Bpetrushev/sqlzoo | /JOIN_operation.sql | UTF-8 | 3,850 | 4.53125 | 5 | [] | no_license | --1.The first example shows the goal scored by a player with the last name 'Bender'. The * says to list all the columns in the table - a shorter way of saying matchid, teamid, player, gtime
--Modify it to show the matchid and player name for all goals scored by Germany. To identify German players, check for: teamid = '... | true |
c96da48587a6422ed603005c2c9d8064b0c60743 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/Scripts Complementarios/IAXIS-4549/1.Literales.sql | UTF-8 | 2,670 | 2.875 | 3 | [] | no_license | -- LITERAL 89907020
DELETE FROM AXIS_LITERALES WHERE SLITERA = 89907020;
DELETE FROM AXIS_CODLITERALES WHERE SLITERA = 89907020 AND CLITERA = 3;
INSERT INTO AXIS_CODLITERALES (SLITERA,CLITERA) VALUES (89907020, 3);
INSERT INTO AXIS_LITERALES (CIDIOMA, SLITERA, TLITERA) VALUES (1, 89907020, 'El contracte no està registr... | true |
fbdbf89e70604c55ccaf81034256863f101c26e3 | SQL | FITCommunity/Baze-Podataka-2 | /Ispiti/2021-06-24/BP2_2021-06-24_Postavka.sql | UTF-8 | 6,464 | 3.3125 | 3 | [] | no_license | /*
Napomena:
A.
Prilikom bodovanja rješenja prioritet ima rezultat
koji upit treba da vrati (broj zapisa, vrijednosti agregatnih funkcija...).
U slučaju da rezultat upita nije tačan, a rezultat tog upita se koristi
u narednim zadacima, tada se rješenja narednih zadataka,
bez obzira na tačnost koda, ne boduju punim... | true |
50dfd6a160fb453577378be1bdb225ea53ba0db8 | SQL | MaggieFan2018/SQL_Exercises | /LeetCode/Window Function/1549. 每件商品的最新订单.sql | UTF-8 | 261 | 4.0625 | 4 | [] | no_license | WITH t1 AS (SELECT *, RANK() OVER(PARTITION BY product_id ORDER BY order_date DESC) RK
FROM Orders)
SELECT p.product_name, t1.product_id, t1.order_id, t1.order_date
FROM t1
LEFT JOIN Products p
USING(product_id)
WHERE t1.RK = 1
ORDER BY 1, 2, 3;
| true |
846c67f4f38c1496bc0ddd933d5c903da26d9ecb | SQL | adamahrens/sql-bootcamp | /Assessment2.sql | UTF-8 | 2,512 | 4.40625 | 4 | [] | no_license |
/* 1. How can you retrieve all the information from the cd.facilities table? */
SELECT *
FROM cd.facilities
/* 2. You want to print out a list of all of the facilities and their cost to members. How would you retrieve a list of only facility names and costs? */
SELECT name, cast(membercost as money)
FROM cd.facilitie... | true |
41c45eae54b49228bf6efcd973da806d59132b56 | SQL | DmitryPrusov/Authorization_Socialite | /db/votes.sql | UTF-8 | 2,404 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 21, 2017 at 11:31 AM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
2b60f46ce69846389881dcef0d435ddf3a58cb83 | SQL | pum-purum-pum-pum/SQL_course | /SQL_ex120tasks/089.SQL | UTF-8 | 300 | 3.703125 | 4 | [] | no_license | WITH mk_c AS
(
SELECT DISTINCT
maker, COUNT(*) AS cnt
FROM
Product
GROUP BY
maker
)
SELECT DISTINCT
maker, cnt
FROM
mk_c AS m
WHERE
cnt =
(
SELECT
MAX(cnt)
FROM
mk_c
)
UNION
SELECT DISTINCT
maker, cnt
FROM
mk_c AS m
WHERE
cnt =
(
SELECT
MIN(cnt)
FROM
mk_c
)
| true |
aecf40dbeca82ad6bb02b1f040d15de1c5ecde2c | SQL | bg-bi-deploy/SGMA | /req_AP_011.sql | UTF-8 | 4,027 | 3.390625 | 3 | [
"MIT"
] | permissive | select line_number,NumFact,DateFact,NomRaisonFrn,IdfFrn,IceFrn,DsgnBnSrvc,MntHT,sum(TauxTva) TauxTva,sum(MntHT*TauxTva/100) MntTva,TauxPrataDed,MntTvaRec,ModePai,DatePai
from
(
SELECT
apinvl1.line_number,
apinv.INVOICE_NUM NumFact,
apinv.INVOICE_DATE DateFact,
aps.vendor_name NomRaisonFrn,
aps.attribute1 IdfFrn,
aps... | true |
90bfc92bf5759d35007d0940c94c98d184af9724 | SQL | SplendorAnLin/paymentSystem | /rate/rate-core/src/test/resources/sql/CombinationRate.sql | UTF-8 | 636 | 3.234375 | 3 | [] | no_license | -- auto Generated on 2017-12-03 17:19:45
-- DROP TABLE IF EXISTS combination_rate;
CREATE TABLE combination_rate(
rate_rule_code VARCHAR (50) NOT NULL COMMENT '费率规则表',
fee DOUBLE (16,4) NOT NULL COMMENT '费率',
compute_mode VARCHAR (50) NOT NULL COMMENT '计算方式',
max_fee DOUBLE (16,4) NOT NULL COMMENT '最大费率',
min_fe... | true |
e7c728ef4d4aba8c20b73313e7b68f61751c0f2a | SQL | nabucodonosor-java/MapinPedagogics | /backend/src/main/resources/data.sql | UTF-8 | 4,129 | 2.671875 | 3 | [] | no_license | INSERT INTO tb_user (enrollment_Date, img_Url, name, email, password) VALUES
(TIMESTAMP WITH TIME ZONE '2020-11-20T03:00:00Z', 'https://mapin-pedagogics.s3.sa-east-1.amazonaws.com/user-padrao.png', 'Aluno Teste',
'aluno@mapin.com', '$2a$10$eACCYoNOHEqXve8aIWT8Nu3PkMXWBaOxJ9aORUYzfMQCbVBIhZ8tG');
INSERT INTO tb_user (... | true |
7a8e51c5b6e00866f650108e25b3d05df47b9603 | SQL | ganeshbabuNN/Databases | /RDMS/Oracle Database/DBMS_SQL_DML_Update.sql | UTF-8 | 1,314 | 3.390625 | 3 | [] | no_license | ---for update
-- spec
create or replace PACKAGE tababc_dyn_api IS
PROCEDURE update_row(
p_col1 IN tababc.col1%TYPE,
p_col2 IN tababc.col2%TYPE,
p_col3 IN tababc.col3%TYPE
);
END;
/
--body
create or replace PACKAGE BODY tababc_dyn_api IS
PROCEDURE update_row(
p_col1 IN tababc.col1%TYPE,
p_col... | true |
39f817e93e57df2bfc5a306362e7afe20165eeec | SQL | stephsalou/testopenrlg | /code/db/scripts/7-lotslangues.sql | UTF-8 | 551 | 2.90625 | 3 | [] | no_license | CREATE TABLE `lotslangues` (
`id` int(11) NOT NULL,
`code_user_to_create` varchar(255) NOT NULL,
`code_user_to_update` varchar(255),
`date_crea_enr` timestamp NOT NULL,
`date_modif_enr` timestamp,
`code` varchar(50) NOT NULL,
`libelle` varchar(255) NOT NULL,
`marchefk` int(11) DEFAULT NULL
) ENGINE=In... | true |
5c46958655d7e5ff60ba9164351d156d3cdc10ae | SQL | Jahongir97/app_hr_management | /app_hr_management/src/main/resources/data.sql | UTF-8 | 517 | 2.546875 | 3 | [] | no_license | insert into role(id, role_name)
values (1, 'DIRECTOR'),
(2, 'MANAGER'),
(3, 'WORKER');
insert into users(id,account_non_expired,account_non_locked,create_at,credentials_non_expired,email_code,first_name,last_name,password,email,enabled)
values ('4fec9206-f697-11eb-9a03-0242ac130003',true,true,'2021-08-17'... | true |
faf0115ce1cf5a547c64edd287fa1553e974d790 | SQL | wmalisch/UWO-CS-Courses-webpage---database | /assignment2/wmalischscript3.sql | UTF-8 | 3,183 | 3.921875 | 4 | [] | no_license | show databases;
use wmalischassign2db;
-- Query 1 */
select courseName from westernCourses;
-- Query 2 */
select distinct courseCode from outsideCourses;
-- Query 3 */
select * from westernCourses order by courseName asc;
-- Query 4 */
select courseNumber, courseName from westernCourses where weight = '0.5';
-- Qu... | true |
704d1bc48e67f38bd30fa824b798c118ecf81246 | SQL | mmtaha/SQL-Modulo-II | /SQL MODULO II-20210718T213657Z-001/SQL MODULO II/Cap01/CAP_01.sql | ISO-8859-2 | 2,125 | 3.71875 | 4 | [] | no_license | SELECT * FROM sys.objects;
USE PEDIDOS
-- TABELAS DE SISTEMA
-- Armazena todos os objetos do banco de dados
SELECT * FROM SYSOBJECTS
-- Tabelas de usurios
SELECT * FROM SYSOBJECTS WHERE XTYPE = 'U'
-- Chaves primrias
SELECT * FROM SYSOBJECTS WHERE XTYPE = 'PK'
-- Tabelas e suas chaves primrias
SELECT T.NAME AS TABELA... | true |
8612f998ff2993925f68a9d98a101e9d69b702ab | SQL | joubin/BasicClock | /create.sql | UTF-8 | 1,328 | 3.453125 | 3 | [] | no_license |
DROP DATABASE hours;
CREATE DATABASE hours;
use hours;
-- ---
-- Globals
-- ---
-- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- SET FOREIGN_KEY_CHECKS=0;
-- ---
-- Table 'users'
--
-- ---
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` TINYINT NULL AUTO_INCREMENT DEFAULT NULL,
`firstname` VARCH... | true |
c4e3362b5201b8c6db4216a728cb4aa8fd9a97ae | SQL | FrancoGosso/Mokambo_Db | /Mokambo_Db/dbo/Stored Procedures/PRC_TMPBASKET_GET.sql | UTF-8 | 547 | 3.140625 | 3 | [] | no_license | -- =============================================
-- Author: Delpiano
-- Create date: 19/06/2020
-- Description: lettura di un basket temporaneo
-- =============================================
CREATE PROCEDURE PRC_TMPBASKET_GET
@NEGOZIO VARCHAR(10),
@BASKET VARCHAR(250)
AS
BEGIN
SET NOCOUNT ON;
SELECT B.*, A... | true |
00e6a2c3d45d03872af3102898953d6abb27a65f | SQL | jeanantunes/projetocorsql | /REF_CONSTRAINTS/TBOD_VENDA_VIDA.sql | UTF-8 | 487 | 2.796875 | 3 | [] | no_license | --------------------------------------------------------
-- Ref Constraints for Table TBOD_VENDA_VIDA
--------------------------------------------------------
ALTER TABLE "CORRET"."TBOD_VENDA_VIDA" ADD CONSTRAINT "FK_TBOD_VENDA_VIDA_VENDA" FOREIGN KEY ("CD_VENDA")
REFERENCES "CORRET"."TBOD_VENDA" ("CD_VENDA") EN... | true |
167185184f4012d1d821e2211733c67369d0093d | SQL | facebackfeng/moxi | /data/cart.sql | UTF-8 | 2,788 | 2.8125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mydatabase
Source Server Version : 50709
Source Host : localhost:3306
Source Database : project
Target Server Type : MYSQL
Target Server Version : 50709
File Encoding : 65001
Date: 2019-02-15 15:49:56
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... | true |
fa2aae00c0f8501a2434b2c9941690022e066113 | SQL | cacad-ntu/database-system-principles-ass-1 | /queries/sql/q5.sql | UTF-8 | 1,291 | 3.40625 | 3 | [] | no_license | DROP VIEW IF EXISTS year7079 ;
DROP VIEW IF EXISTS year8089 ;
DROP VIEW IF EXISTS year9099 ;
DROP VIEW IF EXISTS year0009 ;
DROP VIEW IF EXISTS year1019 ;
CREATE VIEW year7079 AS(
SELECT count(pub_key) as cnt
FROM publication
WHERE year >=1970 and
year <=1979 and
pub_class =... | true |
61a5a9d20dec800e4f771cc30177280e6556ff5c | SQL | wtewalt/bellhops-supply | /shift_hours.sql | UTF-8 | 1,170 | 3.671875 | 4 | [] | no_license | /* This table was created as a central point to join to for formatted shift lengths based on hour */
CREATE TABLE shift_hours AS
(
select
hours,
CASE WHEN LENGTH(TRIM(wingmen_shifts)) < 5 then '0' || wingmen_shifts ELSE wingmen_shifts END as wingmen_shifts,
CASE WHEN LENGTH(TRIM(axle_shifts)) < 5 th... | true |
52bbd8fa451a0a6d2e0bc713ac8c1af09e2a2132 | SQL | lao101/g5app | /WEB/DB/native.sql | UTF-8 | 1,494 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 30, 2017 at 03:09 PM
-- Server version: 5.5.35-1ubuntu1
-- PHP Version: 5.5.9-1ubuntu4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... | true |
261c19dd5c6ef0b38bd4ddcdb4f016c06d68f782 | SQL | hector81/MySql | /Funciones/Funcion_5_8.sql | UTF-8 | 749 | 3.953125 | 4 | [] | no_license | #5.8 : Función devuelva el nombre del país que menos pedidos haya realizado siempre que sean mayores que uno.
USE neGOcios2011;
DELIMITER $$
DROP FUNCTION IF EXISTS PAIS_PEDIDOS $$
CREATE FUNCTION PAIS_PEDIDOS(CANTIDAD INT) RETURNS VARCHAR(100)
BEGIN
DECLARE PAIS VARCHAR(100);
SELECT paises.nombrepais INTO PAIS
... | true |
60d7fa7818cf0bf8652b2ecaa0f65c9054daeabc | SQL | jporras39/presmate | /model/basedatos.sql | UTF-8 | 42,560 | 3.328125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `presmate` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `presmate`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: presmate
-- ------------------------------------------------------
-- Server version 5.6.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
cb8e2693f432530ea9f601d601876f81ce66edf9 | SQL | Hippukki/SportClubDB | /sportclubdb_202012062153.sql | UTF-8 | 6,311 | 3.328125 | 3 | [] | no_license | --
-- Скрипт сгенерирован Devart dbForge Studio 2020 for MySQL, Версия 9.0.435.0
-- Домашняя страница продукта: http://www.devart.com/ru/dbforge/mysql/studio
-- Дата скрипта: 06.12.2020 21:53:59
-- Версия сервера: 8.0.11
-- Версия клиента: 4.1
--
--
-- Отключение внешних ключей
--
/*!40014 SET @OLD_FOREIGN_KEY_CHEC... | true |
4f9ceb9cb32ec0c60439829c90613a360f36683b | SQL | Group8-coursework/CoronavirusOutbreak-System | /CoronavirusOutbreak-System/SQL/webone_china.sql | UTF-8 | 3,148 | 2.8125 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: webone
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
a7addfbd2d8bbe0bff0ad68e29307c6d27b27a63 | SQL | AlviGeo/kopisop | /kopisop.sql | UTF-8 | 10,297 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 15, 2020 at 11:11 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
84e070cea37c11d4681cc6845b4f6e81c66e608d | SQL | khiaxeng/cs2102-project-team53 | /data.sql | UTF-8 | 635,829 | 2.84375 | 3 | [] | no_license | DELETE FROM Joins;
DELETE FROM Updates;
DELETE FROM Sessions;
DELETE FROM MeetingRooms;
DELETE FROM HealthDeclaration;
DELETE FROM Junior;
DELETE FROM Employees;
DELETE FROM Departments;
-- Departments
insert into Departments (did, dname) values (1, 'Sales');
insert into Departments (did, dname) values (2, 'Engineeri... | true |
3bbeb114b2212681c3060c18c8c17d198de9f497 | SQL | jemin6/CIS322-Introduction-to-Software-Engineering | /export/transfers.sql | UTF-8 | 249 | 2.984375 | 3 | [] | no_license | \echo 'asset_tag,request_by,request_dt,approve_by,approve_dt,source,destination,load_dt,unload_dt'
SELECT a.asset_tag, u.username FROM requests AS r INNER JOIN users AS u ON r.requester_fk=u.user_pk INNER JOIN assets AS a ON r.asset_fk=a.asset_pk;
| true |
7cacd5e896b4eee6fcc8dd54ac44189178150b96 | SQL | tanbinh123/AirlineBookingSystem | /db_create.sql | UTF-8 | 7,206 | 3.703125 | 4 | [] | no_license |
/* create database */
drop database if exists AIRLINE_1;
drop database if exists AIRLINE_2;
drop database if exists AIRLINE_3;
drop database if exists ABS;
create database AIRLINE_1;
create database AIRLINE_2;
create database AIRLINE_3;
create database ABS;
/* create table of database Airline*/
use AIRLINE_1;
crea... | true |
b4510ef6a49f7de8169c647061ee1981c0843ae9 | SQL | chhavi-khandelwal/mysql | /coloredBlock/blocks.sql | UTF-8 | 2,310 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 04, 2012 at 10:19 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
39241559521547d6531d6b1858380a967b2df994 | SQL | fivetran-jamie/solutions | /fivetran_docs_queries/latest_records_modified/bigquery_latest_records_modified.sql | UTF-8 | 820 | 4 | 4 | [] | no_license | with parse_json as (
SELECT
time_stamp,
JSON_EXTRACT(message_data, '$.schema') AS connector_schema,
CAST(JSON_EXTRACT(message_data, '$.count') AS int64) AS row_volume,
message_event,
MAX(CASE WHEN message_event = 'sync_end' THEN time_stamp ELSE NULL END) OVER(PARTITION BY co... | true |
32a812d3c1ad7f5af02218fca102191b6f7e85ff | SQL | Norwegian-marine-datacentre/BarMar | /src/main/resources/db/ddl/parameter_basename.ddl | UTF-8 | 506 | 3.15625 | 3 | [] | no_license | -- Table: parameter_basename
-- DROP TABLE parameter_basename;
CREATE TABLE parameter_basename
(
id bigserial NOT NULL,
name character varying(80) NOT NULL,
standard_name character varying(80) NOT NULL,
CONSTRAINT pkey_parameter_basename PRIMARY KEY (id),
CONSTRAINT unique_name_parameter_basename UNIQUE (na... | true |
48cf07aeca50ba0009c0b4f25fdf4e0437fb5a24 | SQL | Peter9063/BillManage | /Database/create.sql | UTF-8 | 5,830 | 3.234375 | 3 | [] | no_license |
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tab_menu
-- ----------------------------
DROP TABLE IF EXISTS `tab_menu`;
CREATE TABLE `tab_menu` (
`menuId` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单id',
`code` varchar(45) DEFAULT NULL COMMENT '菜单编号',
`pId` bigint(2... | true |
c8a47b5cadd8ae090a5360589cc1409a46bb759f | SQL | dleomil/database | /create_database.sql | UTF-8 | 4,820 | 3.453125 | 3 | [] | no_license | -- Criando um novo database para o curso Java
create database itau;
-- Acessando a base criada
use itau;
-- Criando tabelas na base itau
create table itau.clientes (
codigo_cliente integer not null primary key,
nome_cliente varchar (50) not null,
idade_cliente integer not null,
email_cliente varchar (80)... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.